Simplify NodeTraverser->traverseNode()

This commit is contained in:
Markus Staab 2024-12-30 09:34:17 +01:00 committed by Nikita Popov
parent 74a361814d
commit 45f70ed80a

View File

@ -99,7 +99,14 @@ class NodeTraverser implements NodeTraverserInterface {
if ($this->stopTraversal) {
break;
}
} elseif ($subNode instanceof Node) {
continue;
}
if (!$subNode instanceof Node) {
continue;
}
$traverseChildren = true;
$visitorIndex = -1;
@ -163,7 +170,6 @@ class NodeTraverser implements NodeTraverserInterface {
}
}
}
}
/**
* Recursively traverse array (usually of nodes).