Kaynağa Gözat

[DependencyInjection] format the tags in the findTaggedServiceIds method of the PhpDumper

pablodip 14 yıl önce
ebeveyn
işleme
314d3d06ae

+ 1 - 1
src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php

@@ -240,7 +240,7 @@ EOF;
                 $tags[$name][$id] = $ann;
             }
         }
-        $tags = var_export($tags, true);
+        $tags = $this->exportParameters($tags);
 
         return <<<EOF
 

+ 3 - 2
tests/Symfony/Tests/Component/DependencyInjection/Fixtures/php/services1-1.php

@@ -32,8 +32,9 @@ class Container extends AbstractContainer implements TaggedContainerInterface
      */
     public function findTaggedServiceIds($name)
     {
-        static $tags = array (
-);
+        static $tags = array(
+
+        );
 
         return isset($tags[$name]) ? $tags[$name] : array();
     }

+ 3 - 2
tests/Symfony/Tests/Component/DependencyInjection/Fixtures/php/services1.php

@@ -32,8 +32,9 @@ class ProjectServiceContainer extends Container implements TaggedContainerInterf
      */
     public function findTaggedServiceIds($name)
     {
-        static $tags = array (
-);
+        static $tags = array(
+
+        );
 
         return isset($tags[$name]) ? $tags[$name] : array();
     }

+ 3 - 2
tests/Symfony/Tests/Component/DependencyInjection/Fixtures/php/services8.php

@@ -32,8 +32,9 @@ class ProjectServiceContainer extends Container implements TaggedContainerInterf
      */
     public function findTaggedServiceIds($name)
     {
-        static $tags = array (
-);
+        static $tags = array(
+
+        );
 
         return isset($tags[$name]) ? $tags[$name] : array();
     }

+ 12 - 16
tests/Symfony/Tests/Component/DependencyInjection/Fixtures/php/services9.php

@@ -141,22 +141,18 @@ class ProjectServiceContainer extends Container implements TaggedContainerInterf
      */
     public function findTaggedServiceIds($name)
     {
-        static $tags = array (
-  'foo' => 
-  array (
-    'foo' => 
-    array (
-      0 => 
-      array (
-        'foo' => 'foo',
-      ),
-      1 => 
-      array (
-        'bar' => 'bar',
-      ),
-    ),
-  ),
-);
+        static $tags = array(
+            'foo' => array(
+                'foo' => array(
+                    0 => array(
+                        'foo' => 'foo',
+                    ),
+                    1 => array(
+                        'bar' => 'bar',
+                    ),
+                ),
+            ),
+        );
 
         return isset($tags[$name]) ? $tags[$name] : array();
     }