| Conditions | 3 |
| Paths | 3 |
| Total Lines | 14 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 54 | public function findCommand(Input $input) |
||
| 55 | { |
||
| 56 | foreach (array_keys($this->commands) as $command) { |
||
| 57 | /** @var AbstractCommand $cmd */ |
||
| 58 | $cmd = new $command(); |
||
| 59 | |||
| 60 | if ($cmd->supported($input->text)) { |
||
| 61 | return $cmd; |
||
| 62 | } |
||
| 63 | } |
||
| 64 | |||
| 65 | $cmd = new $this->defaultCommand(); |
||
| 66 | |||
| 67 | return $cmd; |
||
| 68 | } |
||
| 70 |