Skip to content

Commit 1f35834

Browse files
committed
1 parent 26adf1e commit 1f35834

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

rules/DeadCode/Rector/Node/RemoveNonExistingVarAnnotationRector.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,13 @@ public function refactor(Node $node): ?Node
130130

131131
if ($stmt instanceof Static_) {
132132
foreach ($stmt->vars as $staticVar) {
133-
$extractValues[] = $this->getName($staticVar->var);
133+
$staticVarName = $this->getName($staticVar->var);
134+
135+
if ($staticVarName === null) {
136+
continue;
137+
}
138+
139+
$extractValues[] = $staticVarName;
134140
}
135141
}
136142

0 commit comments

Comments
 (0)