@@ -44,7 +44,9 @@ discard block |
||
44 | 44 | */ |
45 | 45 | protected static function getFightersWithByes(FightersGroup $group) |
46 | 46 | { |
47 | - if ($group == null) return null; |
|
47 | + if ($group == null) { |
|
48 | + return null; |
|
49 | + } |
|
48 | 50 | $fighters = $group->getFightersWithBye(); |
49 | 51 | $fighterType = $group->getFighterType(); |
50 | 52 | if (sizeof($fighters) == 0) { |
@@ -127,9 +129,15 @@ discard block |
||
127 | 129 | */ |
128 | 130 | public function shouldBeInFightList() |
129 | 131 | { |
130 | - if ($this->belongsToFirstRound() && $this->dontHave2Fighters()) return false; |
|
131 | - if (!$this->belongsToFirstRound() && $this->dontHave0Fighters()) return true; |
|
132 | - if ($this->has2Fighters()) return true; |
|
132 | + if ($this->belongsToFirstRound() && $this->dontHave2Fighters()) { |
|
133 | + return false; |
|
134 | + } |
|
135 | + if (!$this->belongsToFirstRound() && $this->dontHave0Fighters()) { |
|
136 | + return true; |
|
137 | + } |
|
138 | + if ($this->has2Fighters()) { |
|
139 | + return true; |
|
140 | + } |
|
133 | 141 | // We aint in the first round, and there is 1 or 0 competitor |
134 | 142 | // We check children, and see : |
135 | 143 | // if there is 2 - 2 fighters -> undetermine, we cannot add it to fight list |
@@ -158,7 +166,9 @@ discard block |
||
158 | 166 | private function belongsToFirstRound() |
159 | 167 | { |
160 | 168 | $firstRoundFights = $this->group->championship->firstRoundFights->pluck('id')->toArray(); |
161 | - if (in_array($this->id, $firstRoundFights)) return true; |
|
169 | + if (in_array($this->id, $firstRoundFights)) { |
|
170 | + return true; |
|
171 | + } |
|
162 | 172 | return false; |
163 | 173 | } |
164 | 174 |