diff vendor/symfony/http-kernel/Bundle/Bundle.php @ 17:129ea1e6d783

Update, including to Drupal core 8.6.10
author Chris Cannam
date Thu, 28 Feb 2019 13:21:36 +0000
parents 1fec387a4317
children
line wrap: on
line diff
--- a/vendor/symfony/http-kernel/Bundle/Bundle.php	Tue Jul 10 15:07:59 2018 +0100
+++ b/vendor/symfony/http-kernel/Bundle/Bundle.php	Thu Feb 28 13:21:36 2019 +0000
@@ -11,12 +11,12 @@
 
 namespace Symfony\Component\HttpKernel\Bundle;
 
+use Symfony\Component\Console\Application;
+use Symfony\Component\DependencyInjection\Container;
 use Symfony\Component\DependencyInjection\ContainerAwareTrait;
 use Symfony\Component\DependencyInjection\ContainerBuilder;
-use Symfony\Component\DependencyInjection\Container;
-use Symfony\Component\Console\Application;
+use Symfony\Component\DependencyInjection\Extension\ExtensionInterface;
 use Symfony\Component\Finder\Finder;
-use Symfony\Component\DependencyInjection\Extension\ExtensionInterface;
 
 /**
  * An implementation of BundleInterface that adds a few conventions
@@ -34,23 +34,21 @@
     private $namespace;
 
     /**
-     * Boots the Bundle.
+     * {@inheritdoc}
      */
     public function boot()
     {
     }
 
     /**
-     * Shutdowns the Bundle.
+     * {@inheritdoc}
      */
     public function shutdown()
     {
     }
 
     /**
-     * Builds the bundle.
-     *
-     * It is only ever called once when the cache is empty.
+     * {@inheritdoc}
      *
      * This method can be overridden to register compilation passes,
      * other extensions, ...
@@ -73,7 +71,7 @@
 
             if (null !== $extension) {
                 if (!$extension instanceof ExtensionInterface) {
-                    throw new \LogicException(sprintf('Extension %s must implement Symfony\Component\DependencyInjection\Extension\ExtensionInterface.', get_class($extension)));
+                    throw new \LogicException(sprintf('Extension %s must implement Symfony\Component\DependencyInjection\Extension\ExtensionInterface.', \get_class($extension)));
                 }
 
                 // check naming convention
@@ -81,10 +79,7 @@
                 $expectedAlias = Container::underscore($basename);
 
                 if ($expectedAlias != $extension->getAlias()) {
-                    throw new \LogicException(sprintf(
-                        'Users will expect the alias of the default extension of a bundle to be the underscored version of the bundle name ("%s"). You can override "Bundle::getContainerExtension()" if you want to use "%s" or another alias.',
-                        $expectedAlias, $extension->getAlias()
-                    ));
+                    throw new \LogicException(sprintf('Users will expect the alias of the default extension of a bundle to be the underscored version of the bundle name ("%s"). You can override "Bundle::getContainerExtension()" if you want to use "%s" or another alias.', $expectedAlias, $extension->getAlias()));
                 }
 
                 $this->extension = $extension;
@@ -99,9 +94,7 @@
     }
 
     /**
-     * Gets the Bundle namespace.
-     *
-     * @return string The Bundle namespace
+     * {@inheritdoc}
      */
     public function getNamespace()
     {
@@ -113,33 +106,27 @@
     }
 
     /**
-     * Gets the Bundle directory path.
-     *
-     * @return string The Bundle absolute path
+     * {@inheritdoc}
      */
     public function getPath()
     {
         if (null === $this->path) {
             $reflected = new \ReflectionObject($this);
-            $this->path = dirname($reflected->getFileName());
+            $this->path = \dirname($reflected->getFileName());
         }
 
         return $this->path;
     }
 
     /**
-     * Returns the bundle parent name.
-     *
-     * @return string|null The Bundle parent name it overrides or null if no parent
+     * {@inheritdoc}
      */
     public function getParent()
     {
     }
 
     /**
-     * Returns the bundle name (the class short name).
-     *
-     * @return string The Bundle name
+     * {@inheritdoc}
      */
     final public function getName()
     {
@@ -179,7 +166,7 @@
             }
             $class = $ns.'\\'.$file->getBasename('.php');
             if ($this->container) {
-                $commandIds = $this->container->hasParameter('console.command.ids') ? $this->container->getParameter('console.command.ids') : array();
+                $commandIds = $this->container->hasParameter('console.command.ids') ? $this->container->getParameter('console.command.ids') : [];
                 $alias = 'console.command.'.strtolower(str_replace('\\', '_', $class));
                 if (isset($commandIds[$alias]) || $this->container->has($alias)) {
                     continue;