| Conditions | 2 |
| Paths | 2 |
| Total Lines | 10 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 5 |
| CRAP Score | 2 |
| 1 | <?php |
||
| 42 | 3 | public function get($fqcn) |
|
| 43 | { |
||
| 44 | 3 | $serviceName = $this->getCanonicalName($fqcn); |
|
| 45 | |||
| 46 | 3 | if ($this->diAbstractFactory->canCreateServiceWithName($this->serviceLocator, $serviceName, $fqcn)) { |
|
| 47 | 1 | return $this->diAbstractFactory->createServiceWithName($this->serviceLocator, $serviceName, $fqcn); |
|
| 48 | } |
||
| 49 | |||
| 50 | 2 | throw CannotCreateService::forClass($fqcn); |
|
| 51 | } |
||
| 52 | } |
||
| 53 |