@@ -104,7 +104,7 @@ discard block |
||
| 104 | 104 | $instance = $this->getInstance($resolvedClass['binding'], $resolvedClass['args'] ?? $constructorArguments); |
| 105 | 105 | } |
| 106 | 106 | |
| 107 | - foreach($resolvedClass['calls'] ?? [] as $calls) { |
|
| 107 | + foreach ($resolvedClass['calls'] ?? [] as $calls) { |
|
| 108 | 108 | $method = new \ReflectionMethod($instance, $calls[0]); |
| 109 | 109 | $method->invokeArgs($instance, $this->getMethodArguments($method, $calls[1])); |
| 110 | 110 | } |
@@ -136,7 +136,7 @@ discard block |
||
| 136 | 136 | */ |
| 137 | 137 | private function resolveArgument($argument, $class) |
| 138 | 138 | { |
| 139 | - if($class && is_string($argument)) { |
|
| 139 | + if ($class && is_string($argument)) { |
|
| 140 | 140 | return $this->resolve($argument); |
| 141 | 141 | } |
| 142 | 142 | return $argument; |
@@ -160,8 +160,7 @@ discard block |
||
| 160 | 160 | if (isset($methodArguments[$parameter->getName()])) { |
| 161 | 161 | $argumentValues[] = $this->resolveArgument($methodArguments[$parameter->getName()], $className); |
| 162 | 162 | } else { |
| 163 | - $argumentValues[] = $className ? $this->resolve($className) : |
|
| 164 | - ($parameter->isDefaultValueAvailable() ? $parameter->getDefaultValue() : null); |
|
| 163 | + $argumentValues[] = $className ? $this->resolve($className) : ($parameter->isDefaultValueAvailable() ? $parameter->getDefaultValue() : null); |
|
| 165 | 164 | } |
| 166 | 165 | } |
| 167 | 166 | return $argumentValues; |