Conditions | 2 |
Paths | 2 |
Total Lines | 12 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
26 | final public function handle(Command $command): void |
||
27 | { |
||
28 | if ($command->getCommandType() !== $this->getSupportedCommandType()) { |
||
29 | throw new InvalidCommandException(\sprintf( |
||
30 | 'Command handler "%s" can only handle "%s" commands, "%s" given.', |
||
31 | static::class, |
||
32 | $this->getSupportedCommandType(), |
||
33 | $command->getCommandType() |
||
34 | )); |
||
35 | } |
||
36 | |||
37 | $this->handleCommand($command); |
||
38 | } |
||
54 |