Total Complexity | 3 |
Total Lines | 45 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php declare(strict_types=1); |
||
13 | final class BlockingProcess implements Handler |
||
14 | { |
||
15 | /** @var Matches */ |
||
16 | private $matches; |
||
17 | /** @var Clock */ |
||
18 | private $clock; |
||
19 | /** @var EventBag */ |
||
20 | private $eventBag; |
||
21 | |||
22 | public function __construct( |
||
30 | } |
||
31 | |||
32 | public function handle(object $command): void |
||
33 | { |
||
34 | assert($command instanceof BlockTheAttacker); |
||
35 | |||
36 | $this->sendIntoBattle( |
||
37 | $this->matches->withId($command->match()), |
||
38 | $command->player(), |
||
39 | $command->defender(), |
||
40 | $command->attacker() |
||
41 | ); |
||
42 | } |
||
43 | |||
44 | private function sendIntoBattle( |
||
58 | } |
||
59 | } |
||
60 |