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