@@ -1,6 +1,6 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types=1); |
|
| 3 | +declare(strict_types = 1); |
|
| 4 | 4 | |
| 5 | 5 | namespace Stratadox\Di; |
| 6 | 6 | |
@@ -85,7 +85,7 @@ discard block |
||
| 85 | 85 | } |
| 86 | 86 | $class = $this->links[$name]; |
| 87 | 87 | $this->resolveClass(new Reflected($class)); |
| 88 | - $this->container->set($name, function () use ($class) { |
|
| 88 | + $this->container->set($name, function() use ($class) { |
|
| 89 | 89 | return $this->container->get($class); |
| 90 | 90 | }); |
| 91 | 91 | } |
@@ -101,7 +101,7 @@ discard block |
||
| 101 | 101 | } |
| 102 | 102 | } |
| 103 | 103 | $container = $this->container; |
| 104 | - $container->set($name, function () use ($name, $dependencies, $container) { |
|
| 104 | + $container->set($name, function() use ($name, $dependencies, $container) { |
|
| 105 | 105 | $parameters = []; |
| 106 | 106 | foreach ($dependencies as $dependency) { |
| 107 | 107 | $parameters[] = $container->get($dependency); |
@@ -75,7 +75,9 @@ |
||
| 75 | 75 | /** @throws ServiceNotFound */ |
| 76 | 76 | private function mustKnowAbout(string $theService) : void |
| 77 | 77 | { |
| 78 | - if ($this->has($theService)) return; |
|
| 78 | + if ($this->has($theService)) { |
|
| 79 | + return; |
|
| 80 | + } |
|
| 79 | 81 | throw ServiceNotFound::noServiceNamed($theService); |
| 80 | 82 | } |
| 81 | 83 | } |