Completed
Pull Request — master (#57)
by Sam
06:41
created
tests/unit/ContainerTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -199,7 +199,7 @@
 block discarded – undo
199 199
     {
200 200
         $container = new Container();
201 201
         $container->set('engine', EngineMarkOne::class);
202
-        $container->set('test', function (ContainerInterface $container) {
202
+        $container->set('test', function(ContainerInterface $container) {
203 203
             return $container->get('engine');
204 204
         });
205 205
 
Please login to merge, or discard this patch.
tests/unit/InjectorTest.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
             EngineInterface::class => EngineMarkTwo::class,
23 23
         ]);
24 24
 
25
-        $getEngineName = function (EngineInterface $engine) {
25
+        $getEngineName = function(EngineInterface $engine) {
26 26
             return $engine->getName();
27 27
         };
28 28
 
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
             EngineInterface::class => EngineMarkTwo::class,
39 39
         ]);
40 40
 
41
-        $getEngineName = function (EngineInterface $engine, $two) {
41
+        $getEngineName = function(EngineInterface $engine, $two) {
42 42
             return $engine->getName();
43 43
         };
44 44
 
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
             EngineInterface::class => EngineMarkTwo::class,
55 55
         ]);
56 56
 
57
-        $getEngineName = function (EngineInterface $engine, ColorInterface $color) {
57
+        $getEngineName = function(EngineInterface $engine, ColorInterface $color) {
58 58
             return $engine->getName();
59 59
         };
60 60
 
Please login to merge, or discard this patch.
src/CompositeContextContainer.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -41,11 +41,11 @@  discard block
 block discarded – undo
41 41
      */
42 42
     private function getContainers(string $context): iterable
43 43
     {
44
-        foreach($this->containers as $prefix => $containers) {
44
+        foreach ($this->containers as $prefix => $containers) {
45 45
             if (strncmp($prefix, $context, mb_strlen($prefix)) !== 0) {
46 46
                 continue;
47 47
             }
48
-            foreach($containers as $container) {
48
+            foreach ($containers as $container) {
49 49
                 yield $container;
50 50
             }
51 51
         }
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
 
74 74
         // If the context is new we reorder the containers array.
75 75
         if (count($this->containers[$context]) === 1) {
76
-            uksort($this->containers, function ($a, $b) {
76
+            uksort($this->containers, function($a, $b) {
77 77
                 return mb_strlen($b) <=> mb_strlen($a);
78 78
             });
79 79
         }
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
     public function detach(ContainerInterface $container)
87 87
     {
88 88
         foreach ($this->containers as $prefix => $containers) {
89
-            foreach($containers as $i => $c) {
89
+            foreach ($containers as $i => $c) {
90 90
                 if ($container === $c) {
91 91
                     unset($this->containers[$prefix][$i]);
92 92
                 }
Please login to merge, or discard this patch.
tests/unit/CompositeContextContainerTest.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -72,5 +72,5 @@
 block discarded – undo
72 72
         $this->assertTrue($contextAB->has(Car::class));
73 73
         $this->assertTrue($contextAB->has(EngineInterface::class));
74 74
 
75
-   }
75
+    }
76 76
 }
Please login to merge, or discard this patch.