Skip to content

Commit

Permalink
Merge pull request #97 from samsonasik/enable-strict-bool
Browse files Browse the repository at this point in the history
[Rector] Enable SetList::STRICT_BOOLEANS
  • Loading branch information
samsonasik authored Nov 19, 2023
2 parents fd6e1b4 + 725b667 commit 38827e5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions rector.php
Original file line number Diff line number Diff line change
Expand Up @@ -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([
Expand All @@ -19,6 +20,7 @@
SetList::NAMING,
SetList::PRIVATIZATION,
SetList::TYPE_DECLARATION,
SetList::STRICT_BOOLEANS,
]);

$rectorConfig->parallel();
Expand All @@ -37,5 +39,8 @@
__DIR__ . '/spec',
],
FirstClassCallableRector::class,
BooleanInBooleanNotRuleFixerRector::class => [
__DIR__ . '/src/Handler/Logging.php',
],
]);
};
4 changes: 2 additions & 2 deletions src/Handler/Logging.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 38827e5

Please sign in to comment.