src/ReflectionMethod.php
public static function collectFromClassNode(ClassLike $classLikeNode, ReflectionClass $reflectionClass)
    {
        $methods = [];

        foreach ($classLikeNode->stmts as $classLevelNode) {
            if ($classLevelNode instanceof ClassMethod) {
                $classLevelNode->setAttribute('fileName', $classLikeNode->getAttribute('fileName'));

                $methodName = $classLevelNode->name->toString();
                $methods[$methodName] = new ReflectionMethod(
                    $reflectionClass->name,
                    $methodName,
                    $classLevelNode,
                    $reflectionClass
                );
            }
        }

        return $methods;
    }
public static function collectFromClassNode(ClassLike $classLikeNode, ReflectionClass $reflectionClass)
    {
        $methods = [];

        foreach ($classLikeNode->stmts as $classLevelNode) {
            if ($classLevelNode instanceof ClassMethod) {
                $classLevelNode->setAttribute('fileName', $classLikeNode->getAttribute('fileName'));

                $methodName = $classLevelNode->name->toString();
                $methods[$methodName] = new ReflectionMethod(
                    $reflectionClass->name,
                    $methodName,
                    $classLevelNode,
                    $reflectionClass
                );
            }
        }

        return $methods;
    }
public static function collectFromClassNode ( ClassLike $ classLikeNode , ReflectionClass $ reflectionClass ) { $ methods = [ ] ; foreach ( $ classLikeNode -> stmts as $ classLevelNode ) { if ( $ classLevelNode instanceof ClassMethod ) { $ classLevelNode -> setAttribute ( 'fileName' , $ classLikeNode -> getAttribute ( 'fileName' ) ) ; $ methodName = $ classLevelNode -> name -> toString ( ) ; $ methods [ $ methodName ] = new ReflectionMethod ( $ reflectionClass -> name , $ methodName , $ classLevelNode , $ reflectionClass ) ; } } return $ methods ; }
Parses methods from the concrete class node

@param ClassLike $classLikeNode Class-like node
@param ReflectionClass $reflectionClass Reflection of the class

@return array|ReflectionMethod[]
Parses methods from the concrete class node