@@ -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 |
@@ -23,7 +23,7 @@ discard block |
||
23 | 23 | |
24 | 24 | public function constructor(string $param, $value): self |
25 | 25 | { |
26 | - if (! $this->definition instanceof ClassDefinition) { |
|
26 | + if (!$this->definition instanceof ClassDefinition) { |
|
27 | 27 | throw DefinitionException::unavailableConstructorParameters($this->definition); |
28 | 28 | } |
29 | 29 | |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | |
34 | 34 | public function setShared(bool $share): self |
35 | 35 | { |
36 | - if (! $this->definition instanceof Shareable) { |
|
36 | + if (!$this->definition instanceof Shareable) { |
|
37 | 37 | throw DefinitionException::unshareable($this->definition); |
38 | 38 | } |
39 | 39 | |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | |
44 | 44 | public function addMethodCall(string $method, array $parameters = []): self |
45 | 45 | { |
46 | - if (! $this->definition instanceof CallableMethod) { |
|
46 | + if (!$this->definition instanceof CallableMethod) { |
|
47 | 47 | throw DefinitionException::unavailableMethodCall($this->definition); |
48 | 48 | } |
49 | 49 | |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | |
54 | 54 | public function addTag(string ...$tag): self |
55 | 55 | { |
56 | - if (! $this->definition instanceof Taggable) { |
|
56 | + if (!$this->definition instanceof Taggable) { |
|
57 | 57 | throw DefinitionException::untaggable($this->definition); |
58 | 58 | } |
59 | 59 |
@@ -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 | } |
@@ -43,7 +43,7 @@ |
||
43 | 43 | |
44 | 44 | if (is_array($value)) { |
45 | 45 | $hasDefinitionInside = false; |
46 | - array_walk_recursive($value, function ($item) use (&$hasDefinitionInside) { |
|
46 | + array_walk_recursive($value, function($item) use (&$hasDefinitionInside) { |
|
47 | 47 | if ($item instanceof ReferenceDefinition) { |
48 | 48 | $hasDefinitionInside = true; |
49 | 49 | } |
@@ -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 |
@@ -39,7 +39,7 @@ |
||
39 | 39 | $this->reflector->assertAttributesAvailable(); |
40 | 40 | $reflectionClass = new ReflectionClass($object); |
41 | 41 | foreach ($reflectionClass->getProperties() as $property) { |
42 | - if (! $injection = $this->getInjection($property)) { |
|
42 | + if (!$injection = $this->getInjection($property)) { |
|
43 | 43 | continue; |
44 | 44 | } |
45 | 45 |