Conditions | 2 |
Paths | 2 |
Total Lines | 9 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php declare(strict_types = 1); |
||
25 | public function addCommand(string $commandClass) |
||
26 | { |
||
27 | if (!is_subclass_of($commandClass, Command::class)) { |
||
28 | throw new InvalidArgumentException( |
||
29 | sprintf('Provided command "%s" is not subclass of "%s" class.', $commandClass, Command::class) |
||
30 | ); |
||
31 | } |
||
32 | $this->commands[] = $commandClass; |
||
33 | } |
||
34 | |||
50 | } |