BetterReflection\Reflection\ReflectionClass::getCurrentClassImplementedInterfacesIndexedByName PHP Method

getCurrentClassImplementedInterfacesIndexedByName() private method

private getCurrentClassImplementedInterfacesIndexedByName ( ) : ReflectionClass[]
return ReflectionClass[] indexed by interface name
    private function getCurrentClassImplementedInterfacesIndexedByName()
    {
        $node = $this->node;
        if ($node instanceof ClassNode) {
            return array_merge([], ...array_map(function (Node\Name $interfaceName) {
                return $this->reflectClassForNamedNode($interfaceName)->getInterfacesHierarchy();
            }, $node->implements));
        }
        // assumption: first key is the current interface
        return $this->isInterface() ? array_slice($this->getInterfacesHierarchy(), 1) : [];
    }