Lines Matching refs:nodes
63 * @param Node[] $nodes Array of nodes
67 public function traverse(array $nodes): array { argument
71 if (null !== $return = $visitor->beforeTraverse($nodes)) {
72 $nodes = $return;
76 $nodes = $this->traverseArray($nodes);
80 if (null !== $return = $visitor->afterTraverse($nodes)) {
81 $nodes = $return;
85 return $nodes;
171 * @param array $nodes Array to traverse
175 protected function traverseArray(array $nodes): array { argument
178 foreach ($nodes as $i => $node) {
188 $nodes[$i] = $node = $return;
228 $nodes[$i] = $node = $return;
255 array_splice($nodes, $i, 1, $replace);
259 return $nodes;