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