Lines Matching refs:stmts

16         $stmts    = [$echoNode];
22 $this->assertEquals($stmts, $traverser->traverse($stmts));
24 ['beforeTraverse', $stmts],
31 ['afterTraverse', $stmts],
91 $stmts = [$str1Node, $str2Node];
92 $this->assertEquals([$str2Node], $traverser->traverse($stmts));
94 ['beforeTraverse', $stmts],
115 $stmts = [$str1Node, $str2Node];
116 $this->assertEquals([$str2Node], $traverser->traverse($stmts));
118 ['beforeTraverse', $stmts],
140 $stmts = [$str1Node, $str2Node];
141 $this->assertEquals([$str3Node, $str4Node, $str2Node], $traverser->traverse($stmts));
143 ['beforeTraverse', $stmts],
174 $stmts = [[[$strNode]]];
177 $this->assertEquals($stmts, $traverser->traverse($stmts));
186 $stmts = [$printNode, $negNode];
196 ['beforeTraverse', $stmts],
203 ['afterTraverse', $stmts],
210 $this->assertEquals($stmts, $traverser->traverse($stmts));
223 $stmts = [$printNode, $negNode];
236 $resultStmts = $traverser->traverse($stmts);
240 ['beforeTraverse', $stmts],
250 ['beforeTraverse', $stmts],
263 $stmts = [$mulNode, $printNode];
271 $this->assertEquals($stmts, $traverser->traverse($stmts));
273 ['beforeTraverse', $stmts],
275 ['afterTraverse', $stmts],
284 $this->assertEquals($stmts, $traverser->traverse($stmts));
286 ['beforeTraverse', $stmts],
289 ['afterTraverse', $stmts],
298 $this->assertEquals($stmts, $traverser->traverse($stmts));
300 ['beforeTraverse', $stmts],
304 ['afterTraverse', $stmts],
313 $this->assertEquals($stmts, $traverser->traverse($stmts));
315 ['beforeTraverse', $stmts],
322 ['afterTraverse', $stmts],
332 $this->assertEquals([$printNode], $traverser->traverse($stmts));
334 ['beforeTraverse', $stmts],
352 $stmts = [$if1, $if2];
361 $newStmts = $traverser->traverse($stmts);
367 ['beforeTraverse', $stmts],
380 ['afterTraverse', $stmts],
408 $stmts = [new Node\Stmt\Echo_([new String_('Foo'), new String_('Bar')])];
412 $this->assertSame($stmts, $traverser->traverse($stmts));
418 public function testInvalidReturn($stmts, $visitor, $message): void { argument
424 $traverser->traverse($stmts);
430 $stmts = [$expr];
464 [$stmts, $visitor1, 'enterNode() returned invalid value of type string'],
465 [$stmts, $visitor2, 'enterNode() returned invalid value of type string'],
466 [$stmts, $visitor3, 'leaveNode() returned invalid value of type string'],
467 [$stmts, $visitor4, 'leaveNode() returned invalid value of type string'],
468 … [$stmts, $visitor5, 'leaveNode() may only return an array if the parent structure is an array'],
469 [$stmts, $visitor6, 'leaveNode() returned invalid value of type bool'],
470 …[$stmts, $visitor7, 'Trying to replace statement (Stmt_Expression) with expression (Scalar_Int). A…
471 … [$stmts, $visitor8, 'Trying to replace expression (Scalar_Int) with statement (Stmt_Return)'],
472 … [$stmts, $visitor9, 'REPLACE_WITH_NULL can not be used if the parent structure is an array'],
473 … [$stmts, $visitor10, 'REPLACE_WITH_NULL can not be used if the parent structure is an array'],