private function findMethod(array $classInfo, $name)
    {
        foreach ($this->nodeFetcher->foreachNodes($classInfo) as $stmtData) {
            $stmt = $stmtData['node'];
            if ($stmt instanceof ClassMethod && $stmt->name === $name) {
                return $stmt;
            }
        }

        throw new \InvalidArgumentException(sprintf('method %s not found', $name));
    }
private function findMethod(array $classInfo, $name)
    {
        foreach ($this->nodeFetcher->foreachNodes($classInfo) as $stmtData) {
            $stmt = $stmtData['node'];
            if ($stmt instanceof ClassMethod && $stmt->name === $name) {
                return $stmt;
            }
        }

        throw new \InvalidArgumentException(sprintf('method %s not found', $name));
    }
@param ClassMethod $classInfo
@param string      $name

@throws \InvalidArgumentException

@return \PhpParser\Node\Stmt\ClassMethod