mirror of
https://github.com/danog/psalm.git
synced 2024-11-30 04:39:00 +01:00
Fixup
This commit is contained in:
parent
4e5e30633b
commit
823c9180fd
@ -29,7 +29,7 @@ final class CustomTraverser extends NodeTraverser
|
||||
* @param Node $node node to traverse
|
||||
* @return Node Result of traversal (may be original node or new one)
|
||||
*/
|
||||
protected function traverseNode(Node $node): void
|
||||
protected function traverseNode(Node $node): Node
|
||||
{
|
||||
foreach ($node->getSubNodeNames() as $name) {
|
||||
$subNode = &$node->$name;
|
||||
@ -60,7 +60,7 @@ final class CustomTraverser extends NodeTraverser
|
||||
}
|
||||
|
||||
if ($traverseChildren) {
|
||||
$this->traverseNode($subNode);
|
||||
$subNode = $this->traverseNode($subNode);
|
||||
if ($this->stopTraversal) {
|
||||
break;
|
||||
}
|
||||
@ -88,6 +88,8 @@ final class CustomTraverser extends NodeTraverser
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $node;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user