Conditions | 3 |
Paths | 3 |
Total Lines | 18 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
48 | public function get($commandName) |
||
49 | { |
||
50 | if (!array_key_exists($commandName, $this->callableMap)) { |
||
51 | throw new HandlerNotFoundException(sprintf( |
||
52 | 'Could not find a handler for name "%s"', |
||
53 | $commandName |
||
54 | )); |
||
55 | } |
||
56 | |||
57 | $callable = $this->callableMap[$commandName]; |
||
58 | |||
59 | $methodName = $callable['method'] ?: 'execute'; |
||
60 | |||
61 | return [ |
||
62 | $this->container->get($callable['service']), |
||
63 | $methodName |
||
64 | ]; |
||
65 | } |
||
66 | } |
||
67 |