@@ -141,11 +141,11 @@ discard block |
||
| 141 | 141 | public function has($id): bool |
| 142 | 142 | { |
| 143 | 143 | return |
| 144 | - $this->resolved->has($id) || |
|
| 145 | - $this->definitions->has($id) || |
|
| 146 | - $this->definitions->hasTag($id) || |
|
| 147 | - $this->providers->provides($id) || |
|
| 148 | - $this->delegates->has($id) || |
|
| 144 | + $this->resolved->has($id) || |
|
| 145 | + $this->definitions->has($id) || |
|
| 146 | + $this->definitions->hasTag($id) || |
|
| 147 | + $this->providers->provides($id) || |
|
| 148 | + $this->delegates->has($id) || |
|
| 149 | 149 | $this->shouldAutowireResolve($id); |
| 150 | 150 | } |
| 151 | 151 | |
@@ -157,7 +157,7 @@ discard block |
||
| 157 | 157 | |
| 158 | 158 | return |
| 159 | 159 | $this->circularDependencyDetection |
| 160 | - ->execute($id, function () use ($id) { |
|
| 160 | + ->execute($id, function() use ($id) { |
|
| 161 | 161 | return $this->resolve($id); |
| 162 | 162 | }); |
| 163 | 163 | } |
@@ -34,7 +34,7 @@ |
||
| 34 | 34 | public function __construct(string $id, Closure $fn = null) |
| 35 | 35 | { |
| 36 | 36 | $this->id = $id; |
| 37 | - $this->fn = $fn !== null ? $fn : function ($instance, ContainerInterface $c) { |
|
| 37 | + $this->fn = $fn !== null ? $fn : function($instance, ContainerInterface $c) { |
|
| 38 | 38 | return $instance; |
| 39 | 39 | }; |
| 40 | 40 | } |
@@ -54,11 +54,11 @@ |
||
| 54 | 54 | $values = $this->values; |
| 55 | 55 | |
| 56 | 56 | if ($this->recursive) { |
| 57 | - array_walk_recursive($values, function (&$item) use ($container) { |
|
| 57 | + array_walk_recursive($values, function(&$item) use ($container) { |
|
| 58 | 58 | $item = $item instanceof ReferenceDefinition ? $container->get($item->id()) : $item; |
| 59 | 59 | }); |
| 60 | 60 | } else { |
| 61 | - array_walk($values, function (&$item) use ($container) { |
|
| 61 | + array_walk($values, function(&$item) use ($container) { |
|
| 62 | 62 | $item = $item instanceof ReferenceDefinition ? $container->get($item->id()) : $item; |
| 63 | 63 | }); |
| 64 | 64 | } |
@@ -62,7 +62,7 @@ |
||
| 62 | 62 | public function resolveMany(Definition ...$definitions): array |
| 63 | 63 | { |
| 64 | 64 | return array_map( |
| 65 | - function (Definition $definition) { |
|
| 65 | + function(Definition $definition) { |
|
| 66 | 66 | return $this->resolve($definition); |
| 67 | 67 | }, |
| 68 | 68 | $definitions |
@@ -19,7 +19,7 @@ discard block |
||
| 19 | 19 | { |
| 20 | 20 | $current = $this->getMethodCall(); |
| 21 | 21 | $newCallback = |
| 22 | - function ($instance, ContainerInterface $container) use ($current, $method, $parameters) { |
|
| 22 | + function($instance, ContainerInterface $container) use ($current, $method, $parameters) { |
|
| 23 | 23 | $_parameters = (new ArrayDefinition($parameters))->getConcrete($container); |
| 24 | 24 | $current($instance, $container); |
| 25 | 25 | if (!is_object($instance) || !method_exists($instance, $method)) { |
@@ -33,7 +33,7 @@ discard block |
||
| 33 | 33 | |
| 34 | 34 | public function getMethodCall(): Closure |
| 35 | 35 | { |
| 36 | - return $this->methodsCallback ?? function ($i, $c) { |
|
| 36 | + return $this->methodsCallback ?? function($i, $c) { |
|
| 37 | 37 | } ; |
| 38 | 38 | } |
| 39 | 39 | } |
@@ -20,7 +20,7 @@ |
||
| 20 | 20 | public function getTypeHint($subject, bool $detectPrimitiveTypes = true): ?string |
| 21 | 21 | { |
| 22 | 22 | $type = $subject->getType(); |
| 23 | - if (! $type instanceof ReflectionNamedType) { |
|
| 23 | + if (!$type instanceof ReflectionNamedType) { |
|
| 24 | 24 | return null; |
| 25 | 25 | } |
| 26 | 26 | |
@@ -77,7 +77,7 @@ |
||
| 77 | 77 | } |
| 78 | 78 | |
| 79 | 79 | $hasDefinitionInside = false; |
| 80 | - array_walk_recursive($value, function ($item) use (&$hasDefinitionInside) { |
|
| 80 | + array_walk_recursive($value, function($item) use (&$hasDefinitionInside) { |
|
| 81 | 81 | if ($item instanceof ReferenceDefinition) { |
| 82 | 82 | $hasDefinitionInside = true; |
| 83 | 83 | } |
@@ -24,7 +24,7 @@ |
||
| 24 | 24 | $resolved[$name] = true; |
| 25 | 25 | if ($parameter->isVariadic()) { |
| 26 | 26 | $_argument = !is_array($arguments[$name]) ? [$arguments[$name]] : $arguments[$name]; |
| 27 | - $result = array_merge($result, $_argument); |
|
| 27 | + $result = array_merge($result, $_argument); |
|
| 28 | 28 | } else { |
| 29 | 29 | $result[] = $arguments[$name]; |
| 30 | 30 | } |
@@ -38,7 +38,7 @@ |
||
| 38 | 38 | |
| 39 | 39 | $reflectionClass = new ReflectionClass($object); |
| 40 | 40 | foreach ($reflectionClass->getProperties() as $property) { |
| 41 | - if (! $injection = $this->getInjection($property)) { |
|
| 41 | + if (!$injection = $this->getInjection($property)) { |
|
| 42 | 42 | continue; |
| 43 | 43 | } |
| 44 | 44 | |