Conditions | 2 |
Paths | 2 |
Total Lines | 10 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
36 | public function getHandlerForCommand($command) |
||
37 | { |
||
38 | $handler = substr_replace($command, 'CommandHandler', strrpos($command, 'Command')); |
||
39 | |||
40 | if (! class_exists($handler)) { |
||
41 | throw MissingHandlerException::forCommand($command); |
||
42 | } |
||
43 | |||
44 | return $this->container->make($handler); |
||
45 | } |
||
46 | } |
||
47 |