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