@@ -164,7 +164,7 @@ discard block |
||
| 164 | 164 | protected function getClassName(string $class): string |
| 165 | 165 | { |
| 166 | 166 | if (!$this->has($class)) { |
| 167 | - throw new NotFoundException('Class or alias ' . $class . ' does not exist'); |
|
| 167 | + throw new NotFoundException('Class or alias '.$class.' does not exist'); |
|
| 168 | 168 | } |
| 169 | 169 | while ($preference = $this->preferences[$class] ?? false) { |
| 170 | 170 | $class = $preference; |
@@ -197,7 +197,7 @@ discard block |
||
| 197 | 197 | $methodInfo = $this->getMethodInfo(new \ReflectionMethod($class, $method)); |
| 198 | 198 | foreach ($instance as $methodParameters) { |
| 199 | 199 | $methodParams = $this->getParameters($methodInfo, $methodParameters); |
| 200 | - $callback = function ($params) use ($callback, $method, $methodParams) { |
|
| 200 | + $callback = function($params) use ($callback, $method, $methodParams) { |
|
| 201 | 201 | $object = $callback($params); |
| 202 | 202 | $object->$method(...$methodParams); |
| 203 | 203 | return $object; |
@@ -212,14 +212,14 @@ discard block |
||
| 212 | 212 | { |
| 213 | 213 | $constructor = (new \ReflectionClass($class))->getConstructor(); |
| 214 | 214 | if (!$constructor || !$constructor->getNumberOfParameters()) { |
| 215 | - return function () use ($class) { |
|
| 215 | + return function() use ($class) { |
|
| 216 | 216 | return new $class; |
| 217 | 217 | }; |
| 218 | 218 | } |
| 219 | 219 | $constructorInfo = $this->getMethodInfo($constructor); |
| 220 | 220 | $predefinedParams = $this->params[$class] ?? []; |
| 221 | 221 | |
| 222 | - return function ($params) use ($class, $constructorInfo, $predefinedParams) { |
|
| 222 | + return function($params) use ($class, $constructorInfo, $predefinedParams) { |
|
| 223 | 223 | return new $class(...$this->getParameters($constructorInfo, $params + $predefinedParams)); |
| 224 | 224 | }; |
| 225 | 225 | } |
@@ -255,7 +255,7 @@ discard block |
||
| 255 | 255 | } elseif ($param['type']) { |
| 256 | 256 | $parameters[] = $this->create($param['type']); |
| 257 | 257 | } else { |
| 258 | - throw new ContainerException('Required parameter $' . $param['name'] . ' is missing'); |
|
| 258 | + throw new ContainerException('Required parameter $'.$param['name'].' is missing'); |
|
| 259 | 259 | } |
| 260 | 260 | } |
| 261 | 261 | return $parameters; |