Lines Matching refs:nodes
12 * @param Node|Node[] $nodes Single node or array of nodes to search in
17 public function find($nodes, callable $filter): array { argument
18 if ($nodes === []) {
22 if (!is_array($nodes)) {
23 $nodes = [$nodes];
29 $traverser->traverse($nodes);
39 * @param Node|Node[] $nodes Single node or array of nodes to search in
44 public function findInstanceOf($nodes, string $class): array { argument
45 return $this->find($nodes, function ($node) use ($class) {
53 * @param Node|Node[] $nodes Single node or array of nodes to search in
58 public function findFirst($nodes, callable $filter): ?Node { argument
59 if ($nodes === []) {
63 if (!is_array($nodes)) {
64 $nodes = [$nodes];
70 $traverser->traverse($nodes);
80 * @param Node|Node[] $nodes Single node or array of nodes to search in
85 public function findFirstInstanceOf($nodes, string $class): ?Node { argument
86 return $this->findFirst($nodes, function ($node) use ($class) {