Conditions | 1 |
Paths | 1 |
Total Lines | 15 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 1 |
Changes | 0 |
1 | <?php declare(strict_types=1); |
||
17 | 1 | public static function forCommand(string $commandClass, int $code = 0, Throwable $previous = null): self |
|
18 | { |
||
19 | 1 | $message = sprintf( |
|
20 | 1 | "I cannot find a handler for the command `%s`. %s |
|
21 | You should check those possibilities: %s |
||
22 | - You forgot to inject a CommandHandlerMap to the CommandBus. %s |
||
23 | - You forgot to add the couple command/handler to your CommandHandlerMap.", |
||
24 | $commandClass, |
||
25 | 1 | PHP_EOL, |
|
26 | 1 | PHP_EOL, |
|
27 | 1 | PHP_EOL |
|
28 | ); |
||
29 | |||
30 | 1 | return new self($message, $code, $previous); |
|
31 | } |
||
32 | } |
||
33 |