| Conditions | 3 |
| Paths | 2 |
| Total Lines | 12 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 3 |
| Changes | 0 | ||
| 1 | <?php |
||
| 29 | 2 | public function getService($serviceName) |
|
| 30 | { |
||
| 31 | 2 | if (empty($serviceName) |
|
| 32 | 2 | || !$this->getContainer()->has($serviceName) |
|
| 33 | ) { |
||
| 34 | 1 | throw new MissingServiceException( |
|
| 35 | 1 | 'Unable to locate service '.$serviceName |
|
| 36 | ); |
||
| 37 | } |
||
| 38 | |||
| 39 | 1 | return $this->getContainer()->get($serviceName); |
|
| 40 | } |
||
| 41 | } |
||
| 42 |