Skip to content

Commit 97195fc

Browse files
committed
use null compare for error_get_last() no error yet
1 parent a161701 commit 97195fc

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

rector.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
declare(strict_types=1);
44

55
use Rector\CodeQuality\Rector\Array_\CallableThisArrayToAnonymousFunctionRector;
6-
use Rector\CodeQuality\Rector\If_\ExplicitBoolCompareRector;
76
use Rector\CodingStyle\Rector\ClassMethod\UnSpreadOperatorRector;
87
use Rector\Core\Configuration\Option;
98
use Rector\Core\ValueObject\PhpVersion;
@@ -31,7 +30,6 @@
3130

3231
$parameters->set(Option::SKIP, [
3332
CallableThisArrayToAnonymousFunctionRector::class,
34-
ExplicitBoolCompareRector::class,
3533
UnSpreadOperatorRector::class,
3634
]);
3735
};

src/HeroTrait.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ private static function isUncaught(array $error): bool
6262
public function phpFatalErrorHandler(string $buffer): string
6363
{
6464
$error = error_get_last();
65-
if (! $error) {
65+
if ($error === null) {
6666
return $buffer;
6767
}
6868

@@ -74,7 +74,7 @@ public function phpFatalErrorHandler(string $buffer): string
7474
public function execOnShutdown(): void
7575
{
7676
$error = error_get_last();
77-
if (! $error) {
77+
if ($error === null) {
7878
return;
7979
}
8080

0 commit comments

Comments
 (0)