Skip to content

Commit 93bc8da

Browse files
committed
fix issues with assignment nodes
1 parent c51f311 commit 93bc8da

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Searcher.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,10 @@ protected function findReferences(array $ast, string $class, ?string $nodeNamePr
224224
// }
225225

226226
if ($node instanceof Node\Expr\Assign) {
227+
if (! $node->var instanceof Node\Expr\Variable) {
228+
return false;
229+
}
230+
227231
$name = $node->var->name;
228232
}
229233

0 commit comments

Comments
 (0)