Conditions | 2 |
Paths | 2 |
Total Lines | 16 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php declare(strict_types=1); |
||
47 | private function timeForCombat( |
||
48 | int $defender, |
||
49 | Match $match, |
||
50 | CorrelationId $correlationId |
||
51 | ): void { |
||
52 | try { |
||
53 | $match->letTheCombatBegin($defender, $this->clock->now()); |
||
54 | } catch (NotYourTurn $exception) { |
||
55 | $this->eventBag->add(new TriedStartingCombatOutOfTurn( |
||
56 | $correlationId, |
||
57 | $exception->getMessage() |
||
58 | )); |
||
59 | return; |
||
60 | } |
||
61 | |||
62 | $this->eventBag->takeFrom($match); |
||
63 | } |
||
65 |