Skip to content

Commit

Permalink
Fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
danog committed Jan 17, 2024
1 parent 4e5e306 commit 823c918
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/Psalm/Internal/PhpTraverser/CustomTraverser.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public function __construct()
* @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;
Expand Down Expand Up @@ -60,7 +60,7 @@ protected function traverseNode(Node $node): void
}

if ($traverseChildren) {
$this->traverseNode($subNode);
$subNode = $this->traverseNode($subNode);
if ($this->stopTraversal) {
break;
}
Expand Down Expand Up @@ -88,6 +88,8 @@ protected function traverseNode(Node $node): void
}
}
}

return $node;
}

/**
Expand Down

0 comments on commit 823c918

Please sign in to comment.