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 645e59e commit 0504394
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 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): Node
protected function traverseNode(Node $node): void
{
foreach ($node->getSubNodeNames() as $name) {
$subNode = &$node->$name;
Expand Down Expand Up @@ -60,7 +60,7 @@ protected function traverseNode(Node $node): Node
}

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

return $node;
}

/**
Expand Down

0 comments on commit 0504394

Please sign in to comment.