BetterReflection\Reflection\ReflectionClass::scanMethods PHP Method

scanMethods() private method

Construct a flat list of methods that are available. This will search up all parent classes/traits/interfaces/current scope for methods.
private scanMethods ( ) : BetterReflection\Reflection\ReflectionMethod[]
return BetterReflection\Reflection\ReflectionMethod[]
    private function scanMethods()
    {
        // merging together methods from interfaces, parent class, traits, current class (in this precise order)
        /* @var $inheritedMethods \ReflectionMethod[] */
        $inheritedMethods = array_merge(array_merge([], ...array_map(function (ReflectionClass $ancestor) {
            return $ancestor->getMethods();
        }, array_values(array_merge($this->getInterfaces(), array_filter([$this->getParentClass()]), $this->getTraits())))), array_map(function (ClassMethod $methodNode) {
            return ReflectionMethod::createFromNode($this->reflector, $methodNode, $this);
        }, $this->node->getMethods()));
        $methodsByName = [];
        foreach ($inheritedMethods as $inheritedMethod) {
            $methodsByName[$inheritedMethod->getName()] = $inheritedMethod;
        }
        return $methodsByName;
    }