Passed
Push — master ( 0a48c5...20fa94 )
by Michael
01:52
created
src/DependencyInjection/JsonApiExtension.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -45,8 +45,8 @@  discard block
 block discarded – undo
45 45
         $loader->load('mapper.yml');
46 46
         $loader->load('http_client.yml');
47 47
 
48
-        if (isset($config['mappers'])) {
49
-            $this->createMappers($config['mappers'], $container);
48
+        if (isset($config[ 'mappers' ])) {
49
+            $this->createMappers($config[ 'mappers' ], $container);
50 50
         }
51 51
     }
52 52
 
@@ -63,16 +63,16 @@  discard block
 block discarded – undo
63 63
         foreach ($config as $name => $mapperDefinition)
64 64
         {
65 65
             $mapper = new DefinitionDecorator('mrtn_json_api.object_mapper.abstract');
66
-            $mapper->addTag('mrtn_json_api.object_mapper', ['alias' => $name]);
66
+            $mapper->addTag('mrtn_json_api.object_mapper', [ 'alias' => $name ]);
67 67
 
68
-            foreach ($mapperDefinition['handlers'] as $handlerName)
68
+            foreach ($mapperDefinition[ 'handlers' ] as $handlerName)
69 69
             {
70
-                if (! isset($handlers[$handlerName])) {
70
+                if (!isset($handlers[ $handlerName ])) {
71 71
                     throw new \LogicException(sprintf('Mapping handler with name "%s" has not been registered as a service.', $handlerName));
72 72
                 }
73 73
 
74 74
                 $mapper->addMethodCall('addHandler', [
75
-                    new Reference($handlers[$handlerName])
75
+                    new Reference($handlers[ $handlerName ])
76 76
                 ]);
77 77
             }
78 78
 
@@ -90,17 +90,17 @@  discard block
 block discarded – undo
90 90
     {
91 91
         $handlers = $container->findTaggedServiceIds('mrtn_json_api.object_mapper.handler');
92 92
 
93
-        $found = [];
93
+        $found = [ ];
94 94
 
95 95
         foreach ($handlers as $id => $tags)
96 96
         {
97 97
             foreach ($tags as $tag)
98 98
             {
99
-                if (! isset($tag['alias'])) {
99
+                if (!isset($tag[ 'alias' ])) {
100 100
                     continue;
101 101
                 }
102 102
 
103
-                $found[$tag['alias']] = $id;
103
+                $found[ $tag[ 'alias' ] ] = $id;
104 104
             }
105 105
         }
106 106
 
Please login to merge, or discard this patch.