| Conditions | 3 |
| Paths | 3 |
| Total Lines | 23 |
| Code Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 12 |
| CRAP Score | 3 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 18 | 2 | public function resolve(Service $service) |
|
| 19 | { |
||
| 20 | 2 | $resolution = $this->construcrtorResolver->resolve($service); |
|
| 21 | |||
| 22 | 2 | foreach ($service->methods() as $methodName => $value) { |
|
| 23 | 2 | $argument = Argument::fromString($value); |
|
| 24 | |||
| 25 | 2 | if ($argument->isService()) { |
|
| 26 | 2 | $collabortor = Service::box([ |
|
| 27 | 2 | 'name' => $argument->name(), |
|
| 28 | 2 | 'services' => $service->getServicesConfiguration(), |
|
| 29 | ]); |
||
| 30 | |||
| 31 | 2 | $resolution->$methodName( |
|
| 32 | 2 | $this->construcrtorResolver->resolve($collabortor) |
|
| 33 | ); |
||
| 34 | } else { |
||
| 35 | 2 | $resolution->$methodName($value); |
|
| 36 | } |
||
| 37 | } |
||
| 38 | |||
| 39 | 2 | return $resolution; |
|
| 40 | } |
||
| 41 | } |
||
| 42 |