mirror of
https://github.com/nikic/PHP-Parser.git
synced 2025-01-16 22:58:15 +01:00
Simplify NodeTraverser->traverseNode()
This commit is contained in:
parent
74a361814d
commit
45f70ed80a
@ -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).
|
||||
|
Loading…
x
Reference in New Issue
Block a user