Skip to content

Commit 38827e5

Browse files
authored
Merge pull request #97 from samsonasik/enable-strict-bool
[Rector] Enable SetList::STRICT_BOOLEANS
2 parents fd6e1b4 + 725b667 commit 38827e5

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

rector.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
use Rector\Php81\Rector\Array_\FirstClassCallableRector;
1010
use Rector\Set\ValueObject\LevelSetList;
1111
use Rector\Set\ValueObject\SetList;
12+
use Rector\Strict\Rector\BooleanNot\BooleanInBooleanNotRuleFixerRector;
1213

1314
return static function (RectorConfig $rectorConfig): void {
1415
$rectorConfig->sets([
@@ -19,6 +20,7 @@
1920
SetList::NAMING,
2021
SetList::PRIVATIZATION,
2122
SetList::TYPE_DECLARATION,
23+
SetList::STRICT_BOOLEANS,
2224
]);
2325

2426
$rectorConfig->parallel();
@@ -37,5 +39,8 @@
3739
__DIR__ . '/spec',
3840
],
3941
FirstClassCallableRector::class,
42+
BooleanInBooleanNotRuleFixerRector::class => [
43+
__DIR__ . '/src/Handler/Logging.php',
44+
],
4045
]);
4146
};

src/Handler/Logging.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -237,11 +237,11 @@ private function isExists(
237237

238238
private function sendMail(int $priority, string $errorMessage, array $extra, string $subject): void
239239
{
240-
if (! $this->message || ! $this->mailMessageTransport) {
240+
if (! $this->message instanceof Message || ! $this->mailMessageTransport instanceof TransportInterface) {
241241
return;
242242
}
243243

244-
if (! $this->emailReceivers) {
244+
if ($this->emailReceivers === []) {
245245
return;
246246
}
247247

0 commit comments

Comments
 (0)