BetterReflection\Reflection\ReflectionClass::getInterfacesHierarchy PHP Method

getInterfacesHierarchy() private method

This method allows us to retrieve all interfaces parent of the this interface. Do not use on class nodes!
private getInterfacesHierarchy ( ) : ReflectionClass[]
return ReflectionClass[] parent interfaces of this interface
    private function getInterfacesHierarchy()
    {
        if (!$this->isInterface()) {
            throw NotAnInterfaceReflection::fromReflectionClass($this);
        }
        /* @var $node InterfaceNode */
        $node = $this->node;
        return array_merge([$this->getName() => $this], ...array_map(function (Node\Name $interfaceName) {
            return $this->reflectClassForNamedNode($interfaceName)->getInterfacesHierarchy();
        }, $node->extends));
    }