Conditions | 3 |
Paths | 2 |
Total Lines | 11 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
31 | public function extract($command) |
||
32 | { |
||
33 | if (!$command instanceof Command) { |
||
34 | throw new InvalidCommandException(\sprintf( |
||
35 | 'Command must implement "%s" interface, "%s" given', |
||
36 | Command::class, |
||
37 | \is_object($command) ? \get_class($command) : \gettype($command) |
||
38 | )); |
||
39 | } |
||
40 | |||
41 | return $command->getCommandType(); |
||
42 | } |
||
44 |