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