Conditions | 2 |
Paths | 2 |
Total Lines | 13 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 2 |
Changes | 2 | ||
Bugs | 1 | Features | 1 |
1 | <?php |
||
18 | 2 | public function resolve($service, ArgumentBuilder $builder) |
|
19 | { |
||
20 | 2 | $builder->setParams($service->getParams()); |
|
21 | |||
22 | 2 | $arguments = $builder->getArguments(); |
|
23 | |||
24 | 2 | if (!isset($this->instances[$service->getName()])) { |
|
25 | 2 | $refObj = new ReflectionClass($service->getClass()); |
|
26 | 2 | $this->instances[$service->getName()] = $refObj->newInstanceArgs($arguments); |
|
27 | 2 | } |
|
28 | |||
29 | 2 | return $this->instances[$service->getName()]; |
|
30 | } |
||
31 | |||
56 |