PNG  IHDR;IDATxܻn0K )(pA 7LeG{ §㻢|ذaÆ 6lذaÆ 6lذaÆ 6lom$^yذag5bÆ 6lذaÆ 6lذa{ 6lذaÆ `}HFkm,mӪôô! x|'ܢ˟;E:9&ᶒ}{v]n&6 h_tڠ͵-ҫZ;Z$.Pkž)!o>}leQfJTu іچ\X=8Rن4`Vwl>nG^is"ms$ui?wbs[m6K4O.4%/bC%t Mז -lG6mrz2s%9s@-k9=)kB5\+͂Zsٲ Rn~GRC wIcIn7jJhۛNCS|j08yiHKֶۛkɈ+;SzL/F*\Ԕ#"5m2[S=gnaPeғL lذaÆ 6l^ḵaÆ 6lذaÆ 6lذa; _ذaÆ 6lذaÆ 6lذaÆ RIENDB` traverser = new NodeTraverser(); $this->traverser->addVisitor(new SudoVisitor()); } /** * @dataProvider propertyFetches */ public function testPropertyFetch($from, $to) { $this->assertProcessesAs($from, $to); } public function propertyFetches() { return [ ['$a->b', "\Psy\Sudo::fetchProperty(\$a, 'b');"], ['$a->$b', '\Psy\Sudo::fetchProperty($a, $b);'], ["\$a->{'b'}", "\Psy\Sudo::fetchProperty(\$a, 'b');"], ]; } /** * @dataProvider propertyAssigns */ public function testPropertyAssign($from, $to) { $this->assertProcessesAs($from, $to); } public function propertyAssigns() { return [ ['$a->b = $c', "\Psy\Sudo::assignProperty(\$a, 'b', \$c);"], ['$a->$b = $c', '\Psy\Sudo::assignProperty($a, $b, $c);'], ["\$a->{'b'} = \$c", "\Psy\Sudo::assignProperty(\$a, 'b', \$c);"], ]; } /** * @dataProvider methodCalls */ public function testMethodCall($from, $to) { $this->assertProcessesAs($from, $to); } public function methodCalls() { return [ ['$a->b()', "\Psy\Sudo::callMethod(\$a, 'b');"], ['$a->$b()', '\Psy\Sudo::callMethod($a, $b);'], ["\$a->b(\$c, 'd')", "\Psy\Sudo::callMethod(\$a, 'b', \$c, 'd');"], ["\$a->\$b(\$c, 'd')", "\Psy\Sudo::callMethod(\$a, \$b, \$c, 'd');"], ]; } /** * @dataProvider staticPropertyFetches */ public function testStaticPropertyFetch($from, $to) { $this->assertProcessesAs($from, $to); } public function staticPropertyFetches() { return [ ['A::$b', "\Psy\Sudo::fetchStaticProperty('A', 'b');"], ['$a::$b', "\Psy\Sudo::fetchStaticProperty(\$a, 'b');"], ]; } /** * @dataProvider staticPropertyAssigns */ public function testStaticPropertyAssign($from, $to) { $this->assertProcessesAs($from, $to); } public function staticPropertyAssigns() { return [ ['A::$b = $c', "\Psy\Sudo::assignStaticProperty('A', 'b', \$c);"], ['$a::$b = $c', "\Psy\Sudo::assignStaticProperty(\$a, 'b', \$c);"], ]; } /** * @dataProvider staticCalls */ public function testStaticCall($from, $to) { $this->assertProcessesAs($from, $to); } public function staticCalls() { return [ ['A::b()', "\Psy\Sudo::callStatic('A', 'b');"], ['A::$b()', "\Psy\Sudo::callStatic('A', \$b);"], ["A::b(\$c, 'd')", "\Psy\Sudo::callStatic('A', 'b', \$c, 'd');"], ["A::\$b(\$c, 'd')", "\Psy\Sudo::callStatic('A', \$b, \$c, 'd');"], ]; } /** * @dataProvider classConstFetches */ public function testClassConstFetch($from, $to) { $this->assertProcessesAs($from, $to); } public function classConstFetches() { return [ ['A::B', "\Psy\Sudo::fetchClassConst('A', 'B');"], ]; } }