private function isContainer(Type $type): bool
    {
        foreach ($type->getReferencedClasses() as $referencedClass) {
            $isClassOrInterface = class_exists($referencedClass) || interface_exists($referencedClass);
            if ($isClassOrInterface && (new ReflectionClass($referencedClass))->implementsInterface(Container::class)) {
                return true;
            }
        }

        return false;
    }
private function isContainer(Type $type): bool
    {
        foreach ($type->getReferencedClasses() as $referencedClass) {
            $isClassOrInterface = class_exists($referencedClass) || interface_exists($referencedClass);
            if ($isClassOrInterface && (new ReflectionClass($referencedClass))->implementsInterface(Container::class)) {
                return true;
            }
        }

        return false;
    }
private function isContainer ( Type $ type ) : bool { foreach ( $ type -> getReferencedClasses ( ) as $ referencedClass ) { $ isClassOrInterface = class_exists ( $ referencedClass ) || interface_exists ( $ referencedClass ) ; if ( $ isClassOrInterface && ( new ReflectionClass ( $ referencedClass ) ) -> implementsInterface ( Container :: class ) ) { return true ; } } return false ; }
Checks if the provided type implements
the Illuminate Container Contract.

@param \PHPStan\Type\Type $type

@return bool
Checks if the provided type implements the Illuminate Container Contract .