/opt/cpanel/ea-wappspector/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor
Edit: /opt/cpanel/ea-wappspector/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/FindingVisitor.php (1143B)
Found nodes */
protected array $foundNodes;
public function __construct(callable $filterCallback) {
$this->filterCallback = $filterCallback;
}
/**
* Get found nodes satisfying the filter callback.
*
* Nodes are returned in pre-order.
*
* @return list
Found nodes
*/
public function getFoundNodes(): array {
return $this->foundNodes;
}
public function beforeTraverse(array $nodes): ?array {
$this->foundNodes = [];
return null;
}
public function enterNode(Node $node) {
$filterCallback = $this->filterCallback;
if ($filterCallback($node)) {
$this->foundNodes[] = $node;
}
return null;
}
}