public static function isClassMethodCall($class_name, $method_name) {
    return function ($node) use ($class_name, $method_name) {
      if ($node instanceof ClassMethodCallNode) {
        $call_class_name_node = $node->getClassName();
        $call_class_name = $call_class_name_node instanceof NameNode ? $call_class_name_node->getAbsolutePath() : $call_class_name_node->getText();
        $class_matches = $call_class_name === $class_name;
        $method_matches = $node->getMethodName()->getText() === $method_name;
        return $class_matches && $method_matches;
      }
      return FALSE;
    };
  }
public static function isClassMethodCall($class_name, $method_name) {
    return function ($node) use ($class_name, $method_name) {
      if ($node instanceof ClassMethodCallNode) {
        $call_class_name_node = $node->getClassName();
        $call_class_name = $call_class_name_node instanceof NameNode ? $call_class_name_node->getAbsolutePath() : $call_class_name_node->getText();
        $class_matches = $call_class_name === $class_name;
        $method_matches = $node->getMethodName()->getText() === $method_name;
        return $class_matches && $method_matches;
      }
      return FALSE;
    };
  }
public static function isClassMethodCall ( $ class_name , $ method_name ) { return function ( $ node ) use ( $ class_name , $ method_name ) { if ( $ node instanceof ClassMethodCallNode ) { $ call_class_name_node = $ node -> getClassName ( ) ; $ call_class_name = $ call_class_name_node instanceof NameNode ? $ call_class_name_node -> getAbsolutePath ( ) : $ call_class_name_node -> getText ( ) ; $ class_matches = $ call_class_name === $ class_name ; $ method_matches = $ node -> getMethodName ( ) -> getText ( ) === $ method_name ; return $ class_matches && $ method_matches ; } return FALSE ; } ; }
Callback to filter for calls to a class method.

@param string $class_name
Fully qualified class name or expression string.
@param string $method_name
Method name or expression string.
@return callable
Filter callable.
Callback to filter for calls to a class method .