Passed
Push — master ( 3645ad...705ee3 )
by Jakub
31s
created
src/DependencyInjection/CompilerPass/ParamMapperPass.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -9,8 +9,8 @@  discard block
 block discarded – undo
9 9
 
10 10
 final class ParamMapperPass implements CompilerPassInterface
11 11
 {
12
-    public const COLLECTOR_SVC_ID = 'eps.req2cmd.collector.param_collector';
13
-    public const MAPPER_TAG = 'req2cmd.param_mapper';
12
+    public const COLLECTOR_SVC_ID='eps.req2cmd.collector.param_collector';
13
+    public const MAPPER_TAG='req2cmd.param_mapper';
14 14
 
15 15
     /**
16 16
      * {@inheritdoc}
@@ -21,25 +21,25 @@  discard block
 block discarded – undo
21 21
             return;
22 22
         }
23 23
 
24
-        $collector = $container->findDefinition(self::COLLECTOR_SVC_ID);
25
-        $mappersDefinitions = $container->findTaggedServiceIds(self::MAPPER_TAG);
26
-        $mappers = $this->collectMappers($mappersDefinitions);
24
+        $collector=$container->findDefinition(self::COLLECTOR_SVC_ID);
25
+        $mappersDefinitions=$container->findTaggedServiceIds(self::MAPPER_TAG);
26
+        $mappers=$this->collectMappers($mappersDefinitions);
27 27
 
28 28
         $collector->replaceArgument(0, $mappers);
29 29
     }
30 30
 
31 31
     private function collectMappers(array $mappersDefinitions): array
32 32
     {
33
-        $queue = new \SplPriorityQueue();
33
+        $queue=new \SplPriorityQueue();
34 34
 
35 35
         foreach ($mappersDefinitions as $mapperId => $mapperTags) {
36
-            $tagAttributes = $mapperTags[0];
37
-            $priority = $tagAttributes['priority'] ?? 0;
36
+            $tagAttributes=$mapperTags[0];
37
+            $priority=$tagAttributes['priority'] ?? 0;
38 38
             $queue->insert($mapperId, $priority);
39 39
         }
40 40
 
41 41
         return array_map(
42
-            function ($mapperId) {
42
+            function($mapperId) {
43 43
                 return new Reference($mapperId);
44 44
             },
45 45
             iterator_to_array($queue, false)
Please login to merge, or discard this patch.