> */ public function getNodeTypes() : array { return [FuncCall::class, MethodCall::class, StaticCall::class]; } /** * @param FuncCall|MethodCall|StaticCall $node * @return \PhpParser\Node\Expr\FuncCall|\PhpParser\Node\Expr\MethodCall|\PhpParser\Node\Expr\StaticCall|null */ public function refactor(Node $node) { $hasChanged = \false; foreach ($node->args as $nodeArg) { if (!$nodeArg instanceof Arg) { continue; } if (!$nodeArg->byRef) { continue; } $nodeArg->byRef = \false; $hasChanged = \true; } if ($hasChanged) { return $node; } return null; } }