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