Skip to content

Commit

Permalink
[Php56] Move collect checked variables on Node not a Variable on Unde…
Browse files Browse the repository at this point in the history
…finedVariableResolver (#4156)
  • Loading branch information
samsonasik committed Jun 10, 2023
1 parent c3189b1 commit e955e56
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rules/Php56/NodeAnalyzer/UndefinedVariableResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ public function resolve(ClassMethod | Function_ | Closure $node): array
return NodeTraverser::DONT_TRAVERSE_CURRENT_AND_CHILDREN;
}

$checkedVariables = $this->resolveCheckedVariables($node, $checkedVariables);
if ($node instanceof Case_) {
return NodeTraverser::DONT_TRAVERSE_CURRENT_AND_CHILDREN;
}
Expand All @@ -76,6 +75,7 @@ public function resolve(ClassMethod | Function_ | Closure $node): array
}

if (! $node instanceof Variable) {
$checkedVariables = $this->resolveCheckedVariables($node, $checkedVariables);
return null;
}

Expand Down

0 comments on commit e955e56

Please sign in to comment.