Lines Matching refs:traverser
19 $traverser = new NodeTraverser();
20 $traverser->addVisitor($visitor);
22 $this->assertEquals($stmts, $traverser->traverse($stmts));
52 $traverser = new NodeTraverser($visitor1, $visitor2, $visitor3);
55 $this->assertEquals([], $traverser->traverse([]));
87 $traverser = new NodeTraverser();
88 $traverser->addVisitor($visitor2);
89 $traverser->addVisitor($visitor);
92 $this->assertEquals([$str2Node], $traverser->traverse($stmts));
111 $traverser = new NodeTraverser();
112 $traverser->addVisitor($visitor);
113 $traverser->addVisitor($visitor2);
116 $this->assertEquals([$str2Node], $traverser->traverse($stmts));
136 $traverser = new NodeTraverser();
137 $traverser->addVisitor($visitor);
138 $traverser->addVisitor($visitor2);
141 $this->assertEquals([$str3Node, $str4Node, $str2Node], $traverser->traverse($stmts));
161 $traverser = new NodeTraverser();
162 $traverser->addVisitor($visitor);
166 $traverser->traverse([$strStart, $strMiddle, $strEnd])
176 $traverser = new NodeTraverser();
177 $this->assertEquals($stmts, $traverser->traverse($stmts));
206 $traverser = new NodeTraverser();
207 $traverser->addVisitor($visitor1);
208 $traverser->addVisitor($visitor2);
210 $this->assertEquals($stmts, $traverser->traverse($stmts));
232 $traverser = new NodeTraverser();
233 $traverser->addVisitor($visitor1);
234 $traverser->addVisitor($visitor2);
236 $resultStmts = $traverser->traverse($stmts);
269 $traverser = new NodeTraverser();
270 $traverser->addVisitor($visitor);
271 $this->assertEquals($stmts, $traverser->traverse($stmts));
282 $traverser = new NodeTraverser();
283 $traverser->addVisitor($visitor);
284 $this->assertEquals($stmts, $traverser->traverse($stmts));
296 $traverser = new NodeTraverser();
297 $traverser->addVisitor($visitor);
298 $this->assertEquals($stmts, $traverser->traverse($stmts));
311 $traverser = new NodeTraverser();
312 $traverser->addVisitor($visitor);
313 $this->assertEquals($stmts, $traverser->traverse($stmts));
330 $traverser = new NodeTraverser();
331 $traverser->addVisitor($visitor);
332 $this->assertEquals([$printNode], $traverser->traverse($stmts));
358 $traverser = new NodeTraverser();
359 $traverser->addVisitor($visitor1);
360 $traverser->addVisitor($visitor2);
361 $newStmts = $traverser->traverse($stmts);
389 $traverser = new NodeTraverser();
390 $traverser->addVisitor($visitor1);
391 $traverser->addVisitor($visitor2);
392 $traverser->addVisitor($visitor3);
396 })->bindTo($traverser, NodeTraverser::class);
401 $traverser->removeVisitor($visitor2);
410 $traverser = new NodeTraverser();
412 $this->assertSame($stmts, $traverser->traverse($stmts));
422 $traverser = new NodeTraverser();
423 $traverser->addVisitor($visitor);
424 $traverser->traverse($stmts);