| @@ 32-39 (lines=8) @@ | ||
| 29 | * |
|
| 30 | * @throws MissingHandlerException |
|
| 31 | */ |
|
| 32 | public function getHandlerForCommand($commandName) |
|
| 33 | { |
|
| 34 | if (!isset($this->handlers[$commandName])) { |
|
| 35 | throw MissingHandlerException::forCommand($commandName); |
|
| 36 | } |
|
| 37 | ||
| 38 | return $this->handlers[$commandName](); |
|
| 39 | } |
|
| 40 | } |
|
| 41 | ||
| @@ 60-67 (lines=8) @@ | ||
| 57 | * |
|
| 58 | * @throws MissingHandlerException |
|
| 59 | */ |
|
| 60 | public function getHandlerForCommand($commandName) |
|
| 61 | { |
|
| 62 | if (!isset($this->handlers[$commandName])) { |
|
| 63 | throw MissingHandlerException::forCommand($commandName); |
|
| 64 | } |
|
| 65 | ||
| 66 | return $this->handlers[$commandName]; |
|
| 67 | } |
|
| 68 | } |
|
| 69 | ||