Skip to content

Commit b030f94

Browse files
authored
Fix logical comparision
1 parent dd8086f commit b030f94

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

rules/DowngradePhp80/Rector/Expression/DowngradeThrowExprRector.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
use PhpParser\Node\Expr\Assign;
1212
use PhpParser\Node\Expr\BinaryOp\Coalesce;
1313
use PhpParser\Node\Expr\BinaryOp\Identical;
14-
use PhpParser\Node\Expr\BinaryOp\NotIdentical;
14+
use PhpParser\Node\Expr\BinaryOp\Identical;
1515
use PhpParser\Node\Expr\BooleanNot;
1616
use PhpParser\Node\Expr\Closure;
1717
use PhpParser\Node\Expr\ConstFetch;
@@ -253,7 +253,7 @@ private function createIf(Coalesce $coalesce, Throw_ $throw): If_
253253
if ($conditionalExpr instanceof Variable || $conditionalExpr instanceof ArrayDimFetch || $conditionalExpr instanceof PropertyFetch) {
254254
$booleanNot = new BooleanNot(new Isset_([$conditionalExpr]));
255255
} else {
256-
$booleanNot = new NotIdentical($conditionalExpr, new ConstFetch(new Name('null')));
256+
$booleanNot = new Identical($conditionalExpr, new ConstFetch(new Name('null')));
257257
}
258258

259259
return new If_($booleanNot, [

0 commit comments

Comments
 (0)