| Conditions | 5 |
| Paths | 4 |
| Total Lines | 20 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 33 | public function resolve(ReflectionParameter $parameter, array $arguments, array &$result): bool |
||
| 34 | { |
||
| 35 | if ($this->container instanceof Container && !$this->container->attributesEnabled()) { |
||
| 36 | return false; |
||
| 37 | } |
||
| 38 | |||
| 39 | $inject = $this->injection->getInjection($parameter); |
||
| 40 | if (empty($inject)) { |
||
| 41 | return false; |
||
| 42 | } |
||
| 43 | |||
| 44 | if (!$this->container->has($inject)) { |
||
| 45 | throw UnresolvableParameterException::createForFunction( |
||
| 46 | $parameter->getDeclaringFunction(), |
||
| 47 | $parameter->getName() |
||
| 48 | ); |
||
| 49 | } |
||
| 50 | |||
| 51 | $value = $this->container->get($inject); |
||
| 52 | return (new VariadicParameterResolver($value))->resolve($parameter, $arguments, $result); |
||
| 53 | } |
||
| 55 |