diff vendor/symfony/console/DependencyInjection/AddConsoleCommandPass.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/console/DependencyInjection/AddConsoleCommandPass.php	Tue Jul 10 15:07:59 2018 +0100
+++ b/vendor/symfony/console/DependencyInjection/AddConsoleCommandPass.php	Thu Feb 28 13:21:36 2019 +0000
@@ -38,10 +38,10 @@
     public function process(ContainerBuilder $container)
     {
         $commandServices = $container->findTaggedServiceIds($this->commandTag, true);
-        $lazyCommandMap = array();
-        $lazyCommandRefs = array();
-        $serviceIds = array();
-        $lazyServiceIds = array();
+        $lazyCommandMap = [];
+        $lazyCommandRefs = [];
+        $serviceIds = [];
+        $lazyServiceIds = [];
 
         foreach ($commandServices as $id => $tags) {
             $definition = $container->getDefinition($id);
@@ -79,7 +79,7 @@
             unset($tags[0]);
             $lazyCommandMap[$commandName] = $id;
             $lazyCommandRefs[$id] = new TypedReference($id, $class);
-            $aliases = array();
+            $aliases = [];
 
             foreach ($tags as $tag) {
                 if (isset($tag['command'])) {
@@ -88,17 +88,17 @@
                 }
             }
 
-            $definition->addMethodCall('setName', array($commandName));
+            $definition->addMethodCall('setName', [$commandName]);
 
             if ($aliases) {
-                $definition->addMethodCall('setAliases', array($aliases));
+                $definition->addMethodCall('setAliases', [$aliases]);
             }
         }
 
         $container
             ->register($this->commandLoaderServiceId, ContainerCommandLoader::class)
             ->setPublic(true)
-            ->setArguments(array(ServiceLocatorTagPass::register($container, $lazyCommandRefs), $lazyCommandMap));
+            ->setArguments([ServiceLocatorTagPass::register($container, $lazyCommandRefs), $lazyCommandMap]);
 
         $container->setParameter('console.command.ids', $serviceIds);
         $container->setParameter('console.lazy_command.ids', $lazyServiceIds);