Conditions | 2 |
Paths | 2 |
Total Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Tests | 6 |
CRAP Score | 2.0116 |
Changes | 0 |
1 | <?php declare(strict_types=1); |
||
29 | 3 | public function add(object $handler): void |
|
30 | { |
||
31 | 3 | $handlerClass = \get_class($handler); |
|
32 | |||
33 | 3 | if (false === $this->stringEndsWith($handlerClass, 'CommandHandler')) { |
|
34 | return; |
||
35 | } |
||
36 | |||
37 | 3 | $commandClass = $this->getCommandClass($handlerClass); |
|
38 | |||
39 | 3 | $this->map[$commandClass] = $handler; |
|
40 | 3 | } |
|
41 | |||
54 |