1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-30 04:39:00 +01:00
This commit is contained in:
Daniil Gentili 2024-01-17 12:52:36 +01:00
parent 645e59ee53
commit 0504394e8b

View File

@ -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): Node
protected function traverseNode(Node $node): void
{
foreach ($node->getSubNodeNames() as $name) {
$subNode = &$node->$name;
@ -60,7 +60,7 @@ final class CustomTraverser extends NodeTraverser
}
if ($traverseChildren) {
$subNode = $this->traverseNode($subNode);
$this->traverseNode($subNode);
if ($this->stopTraversal) {
break;
}
@ -88,8 +88,6 @@ final class CustomTraverser extends NodeTraverser
}
}
}
return $node;
}
/**