![]() Server : Apache System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64 User : corals ( 1002) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /home/corals/cartforge.co/vendor/rector/rector/rules/Naming/Matcher/ |
<?php declare (strict_types=1); namespace Rector\Naming\Matcher; use PhpParser\Node; use PhpParser\Node\Expr\Assign; use PhpParser\Node\Expr\FuncCall; use PhpParser\Node\Expr\MethodCall; use PhpParser\Node\Expr\StaticCall; use PhpParser\Node\Stmt\Foreach_; final class CallMatcher { /** * @return FuncCall|StaticCall|MethodCall|null * @param \PhpParser\Node\Expr\Assign|\PhpParser\Node\Stmt\Foreach_ $node */ public function matchCall($node) : ?Node { if ($node->expr instanceof MethodCall) { return $node->expr; } if ($node->expr instanceof StaticCall) { return $node->expr; } if ($node->expr instanceof FuncCall) { return $node->expr; } return null; } }