diff --git a/src/Rector/Coalesce/ApplyDefaultInsteadOfNullCoalesceRector.php b/src/Rector/Coalesce/ApplyDefaultInsteadOfNullCoalesceRector.php index 1297aaf1..248acf89 100644 --- a/src/Rector/Coalesce/ApplyDefaultInsteadOfNullCoalesceRector.php +++ b/src/Rector/Coalesce/ApplyDefaultInsteadOfNullCoalesceRector.php @@ -2,6 +2,7 @@ namespace RectorLaravel\Rector\Coalesce; +use PhpParser\Node\Expr\Throw_; use PhpParser\Node; use PhpParser\Node\Arg; use PhpParser\Node\Expr\BinaryOp\Coalesce; @@ -108,13 +109,13 @@ public function refactor(Node $node): MethodCall|StaticCall|FuncCall|null $objectType, $applyDefaultWith->getObjectType()) && $this->isName($call->name, $applyDefaultWith->getMethodName()) && - !$node->right instanceof Node\Expr\Throw_ + ! $node->right instanceof Throw_ ) { $valid = true; } elseif ( $applyDefaultWith->getObjectType() === null && $this->isName($call->name, $applyDefaultWith->getMethodName()) && - !$node->right instanceof Node\Expr\Throw_ + ! $node->right instanceof Throw_ ) { $valid = true; }