original_string: public function leaveNode(Node $node)
      {
          $filter = $this->filter;
  
          if (! $node instanceof ClassMethod || null === ($filterResult = $filter($node))) {
              return null;
          }
  
          if (false === $filterResult) {
              return false;
          }
  
          $node->stmts = array(
              new Throw_(
                  new New_(
                      new FullyQualified('BadMethodCallException'),
                      array(new Arg(new String_('Method is disabled')))
                  )
              )
          );
  
          return $node;
      }
code: public function leaveNode(Node $node)
      {
          $filter = $this->filter;
  
          if (! $node instanceof ClassMethod || null === ($filterResult = $filter($node))) {
              return null;
          }
  
          if (false === $filterResult) {
              return false;
          }
  
          $node->stmts = array(
              new Throw_(
                  new New_(
                      new FullyQualified('BadMethodCallException'),
                      array(new Arg(new String_('Method is disabled')))
                  )
              )
          );
  
          return $node;
      }
code_tokens: public function leaveNode ( Node $ node ) { $ filter = $ this -> filter ; if ( ! $ node instanceof ClassMethod || null === ( $ filterResult = $ filter ( $ node ) ) ) { return null ; } if ( false === $ filterResult ) { return false ; } $ node -> stmts = array ( new Throw_ ( new New_ ( new FullyQualified ( 'BadMethodCallException' ) , array ( new Arg ( new String_ ( 'Method is disabled' ) ) ) ) ) ) ; return $ node ; }
docstring: Replaces the given node if it is a class method and matches according to the given callback
  
  @param \PhpParser\Node $node
  
  @return bool|null|\PhpParser\Node\Stmt\ClassMethod
docstring_tokens: Replaces the given node if it is a class method and matches according to the given callback