Lines Matching refs:stmts
12 $stmts = [new Node\Stmt\Expression($assign)];
14 return [$stmts, $vars];
19 list($stmts, $vars) = $this->getStmtsAndVars();
23 $this->assertSame($vars, $finder->find($stmts, $varFilter));
24 $this->assertSame($vars, $finder->find($stmts[0], $varFilter));
29 $this->assertSame([], $finder->find($stmts, $noneFilter));
34 list($stmts, $vars) = $this->getStmtsAndVars();
35 $this->assertSame($vars, $finder->findInstanceOf($stmts, Expr\Variable::class));
36 $this->assertSame($vars, $finder->findInstanceOf($stmts[0], Expr\Variable::class));
37 $this->assertSame([], $finder->findInstanceOf($stmts, Expr\BinaryOp\Mul::class));
42 list($stmts, $vars) = $this->getStmtsAndVars();
46 $this->assertSame($vars[0], $finder->findFirst($stmts, $varFilter));
47 $this->assertSame($vars[0], $finder->findFirst($stmts[0], $varFilter));
52 $this->assertNull($finder->findFirst($stmts, $noneFilter));
57 list($stmts, $vars) = $this->getStmtsAndVars();
58 $this->assertSame($vars[0], $finder->findFirstInstanceOf($stmts, Expr\Variable::class));
59 $this->assertSame($vars[0], $finder->findFirstInstanceOf($stmts[0], Expr\Variable::class));
60 $this->assertNull($finder->findFirstInstanceOf($stmts, Expr\BinaryOp\Mul::class));