diff --git a/rector.php b/rector.php index ab3d069b..50a29492 100644 --- a/rector.php +++ b/rector.php @@ -9,6 +9,7 @@ use Rector\Php81\Rector\Array_\FirstClassCallableRector; use Rector\Set\ValueObject\LevelSetList; use Rector\Set\ValueObject\SetList; +use Rector\Strict\Rector\BooleanNot\BooleanInBooleanNotRuleFixerRector; return static function (RectorConfig $rectorConfig): void { $rectorConfig->sets([ @@ -19,6 +20,7 @@ SetList::NAMING, SetList::PRIVATIZATION, SetList::TYPE_DECLARATION, + SetList::STRICT_BOOLEANS, ]); $rectorConfig->parallel(); @@ -37,5 +39,8 @@ __DIR__ . '/spec', ], FirstClassCallableRector::class, + BooleanInBooleanNotRuleFixerRector::class => [ + __DIR__ . '/src/Handler/Logging.php', + ], ]); }; diff --git a/src/Handler/Logging.php b/src/Handler/Logging.php index 96cfe049..b22d57f5 100644 --- a/src/Handler/Logging.php +++ b/src/Handler/Logging.php @@ -237,11 +237,11 @@ private function isExists( private function sendMail(int $priority, string $errorMessage, array $extra, string $subject): void { - if (! $this->message || ! $this->mailMessageTransport) { + if (! $this->message instanceof Message || ! $this->mailMessageTransport instanceof TransportInterface) { return; } - if (! $this->emailReceivers) { + if ($this->emailReceivers === []) { return; }