BundleDependenciesResolver.php
private function getBundleDefinitionInstance($bundle): BundleInterface
    {
        if (!is_object($bundle)) {
            $bundle = new $bundle($this);
        }

        if (!$bundle instanceof BundleInterface) {
            throw new BundleDependencyException(get_class($bundle));
        }

        return $bundle;
    }
private function getBundleDefinitionInstance($bundle): BundleInterface
    {
        if (!is_object($bundle)) {
            $bundle = new $bundle($this);
        }

        if (!$bundle instanceof BundleInterface) {
            throw new BundleDependencyException(get_class($bundle));
        }

        return $bundle;
    }
private function getBundleDefinitionInstance ( $ bundle ) : BundleInterface { if ( ! is_object ( $ bundle ) ) { $ bundle = new $ bundle ( $ this ) ; } if ( ! $ bundle instanceof BundleInterface ) { throw new BundleDependencyException ( get_class ( $ bundle ) ) ; } return $ bundle ; }
Given a bundle instance or a namespace, return the instance.
Each bundle is instanced with the Kernel as the first element of the
construction, by default.

@param BundleInterface|string $bundle

@return BundleInterface

@throws BundleDependencyException Is not a BundleInterface implementation
Given a bundle instance or a namespace return the instance . Each bundle is instanced with the Kernel as the first element of the construction by default .