Passed
Branch main (1309ec)
by Breno
01:55
created
Category
src/Container.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -141,11 +141,11 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
     }
Please login to merge, or discard this patch.
src/Definition/Build/ReferenceDefinition.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@
 block discarded – undo
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
     }
Please login to merge, or discard this patch.
src/Definition/Build/ArrayDefinition.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -54,11 +54,11 @@
 block discarded – undo
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
         }
Please login to merge, or discard this patch.
src/Definition/DefinitionResolver.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@
 block discarded – undo
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
Please login to merge, or discard this patch.
src/Definition/DefinitionWrapper.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 
Please login to merge, or discard this patch.
src/Definition/MethodCall/CallableMethodTrait.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 }
Please login to merge, or discard this patch.
src/Definition/AutoDetection.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@
 block discarded – undo
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
                 }
Please login to merge, or discard this patch.
src/Autowiring/Reflector.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
src/Autowiring/Attributes/AttributesInjection.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.