Conditions | 4 |
Paths | 4 |
Total Lines | 14 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 4.0312 |
Changes | 0 |
1 | <?php |
||
57 | 2 | public function hasParticipantWon(Participant $participant): ?bool |
|
58 | { |
||
59 | 2 | $winningRoster = $this->getWinningRoster(); |
|
60 | 2 | if ($winningRoster === null) { |
|
61 | return null; |
||
62 | } |
||
63 | |||
64 | 2 | foreach ($winningRoster->participants as $winningParticipant) { |
|
65 | 2 | if ($winningParticipant->id === $participant->id) { |
|
66 | 2 | return true; |
|
67 | } |
||
68 | } |
||
69 | 2 | return false; |
|
70 | } |
||
71 | } |
||
72 |