Completed
Push — master ( 33747c...dea978 )
by James Ekow Abaka
02:04
created
src/Container.php 1 patch
Spacing   +3 added lines, -4 removed lines patch added patch discarded remove patch
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
             $instance = $this->getInstance($resolvedClass['binding'], $constructorArguments);
101 101
         }
102 102
         
103
-        foreach($resolvedClass['calls'] ?? [] as $calls) {
103
+        foreach ($resolvedClass['calls'] ?? [] as $calls) {
104 104
             $method = new \ReflectionMethod($instance, $calls[0]);
105 105
             $method->invokeArgs($instance, $this->getMethodArguments($method, $calls[1]));
106 106
         }
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
      */
131 131
     private function resolveArgument($argument, $class)
132 132
     {
133
-        if($class && is_string($argument)) {
133
+        if ($class && is_string($argument)) {
134 134
             return $this->resolve($argument);
135 135
         }
136 136
         return $argument;
@@ -153,8 +153,7 @@  discard block
 block discarded – undo
153 153
             if (isset($methodArguments[$parameter->getName()])) {
154 154
                 $argumentValues[] = $this->resolveArgument($methodArguments[$parameter->getName()], $className);
155 155
             } else {
156
-                $argumentValues[] = $className ? $this->resolve($className) :
157
-                    ($parameter->isDefaultValueAvailable() ? $parameter->getDefaultValue() : null);
156
+                $argumentValues[] = $className ? $this->resolve($className) : ($parameter->isDefaultValueAvailable() ? $parameter->getDefaultValue() : null);
158 157
             }
159 158
         }
160 159
         return $argumentValues;
Please login to merge, or discard this patch.