src/ReflectionClass.php
public static function collectInterfacesFromClassNode(ClassLike $classLikeNode)
    {
        $interfaces = [];

        $isInterface    = $classLikeNode instanceof Interface_;
        $interfaceField = $isInterface ? 'extends' : 'implements';
        $hasInterfaces  = in_array($interfaceField, $classLikeNode->getSubNodeNames());
        $implementsList = $hasInterfaces ? $classLikeNode->$interfaceField : array();
        if ($implementsList) {
            foreach ($implementsList as $implementNode) {
                if ($implementNode instanceof FullyQualified) {
                    $implementName  = $implementNode->toString();
                    $interface      = interface_exists($implementName, false)
                        ? new parent($implementName)
                        : new static($implementName);
                    $interfaces[$implementName] = $interface;
                }
            }
        }

        return $interfaces;
    }
public static function collectInterfacesFromClassNode(ClassLike $classLikeNode)
    {
        $interfaces = [];

        $isInterface    = $classLikeNode instanceof Interface_;
        $interfaceField = $isInterface ? 'extends' : 'implements';
        $hasInterfaces  = in_array($interfaceField, $classLikeNode->getSubNodeNames());
        $implementsList = $hasInterfaces ? $classLikeNode->$interfaceField : array();
        if ($implementsList) {
            foreach ($implementsList as $implementNode) {
                if ($implementNode instanceof FullyQualified) {
                    $implementName  = $implementNode->toString();
                    $interface      = interface_exists($implementName, false)
                        ? new parent($implementName)
                        : new static($implementName);
                    $interfaces[$implementName] = $interface;
                }
            }
        }

        return $interfaces;
    }
public static function collectInterfacesFromClassNode ( ClassLike $ classLikeNode ) { $ interfaces = [ ] ; $ isInterface = $ classLikeNode instanceof Interface_ ; $ interfaceField = $ isInterface ? 'extends' : 'implements' ; $ hasInterfaces = in_array ( $ interfaceField , $ classLikeNode -> getSubNodeNames ( ) ) ; $ implementsList = $ hasInterfaces ? $ classLikeNode -> $ interfaceField : array ( ) ; if ( $ implementsList ) { foreach ( $ implementsList as $ implementNode ) { if ( $ implementNode instanceof FullyQualified ) { $ implementName = $ implementNode -> toString ( ) ; $ interface = interface_exists ( $ implementName , false ) ? new parent ( $ implementName ) : new static ( $ implementName ) ; $ interfaces [ $ implementName ] = $ interface ; } } } return $ interfaces ; }
Parses interfaces from the concrete class node

@param ClassLike $classLikeNode Class-like node

@return array|\ReflectionClass[] List of reflections of interfaces
Parses interfaces from the concrete class node