@@ -199,7 +199,7 @@ |
||
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 |
@@ -22,7 +22,7 @@ discard block |
||
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 |
||
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 |
||
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 |
@@ -41,11 +41,11 @@ discard block |
||
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 |
||
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 |
||
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 | } |
@@ -72,5 +72,5 @@ |
||
72 | 72 | $this->assertTrue($contextAB->has(Car::class)); |
73 | 73 | $this->assertTrue($contextAB->has(EngineInterface::class)); |
74 | 74 | |
75 | - } |
|
75 | + } |
|
76 | 76 | } |