variable = $variable; } /** * @return boolean */ public function __invoke(Node $node) { if ($node instanceof FunctionCallNode) { return (boolean) $node->getArgumentList()->children([$this, 'hasArgument'])->count(); } return FALSE; } /** * @return boolean */ public function hasArgument(Node $argument) { return ($argument instanceof VariableNode && $argument->getName() == $this->variable); } }