| Conditions | 3 |
| Paths | 3 |
| Total Lines | 11 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 3 |
| Changes | 0 | ||
| 1 | <?php |
||
| 30 | 9 | public function getHandlerForCommand($commandName) |
|
| 31 | { |
||
| 32 | 9 | if (isset($this->handlers[$commandName])) { |
|
| 33 | 6 | $handler = $this->handlers[$commandName]; |
|
| 34 | 6 | if ($this->container->has($handler)) { |
|
| 35 | 3 | return $this->container->get($handler); |
|
| 36 | } |
||
| 37 | 2 | } |
|
| 38 | |||
| 39 | 6 | throw new MissingHandlerException(sprintf('No handler found for "%s"', $commandName)); |
|
| 40 | } |
||
| 41 | |||
| 53 |