@@ -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) { |
@@ -121,8 +123,12 @@ discard block |
||
| 121 | 123 | |
| 122 | 124 | public function shouldBeInFightList() |
| 123 | 125 | { |
| 124 | - if ($this->belongsToFirstRound() && $this->dontHave2Fighters()) return false; |
|
| 125 | - if ($this->has2Fighters()) return true; |
|
| 126 | + if ($this->belongsToFirstRound() && $this->dontHave2Fighters()) { |
|
| 127 | + return false; |
|
| 128 | + } |
|
| 129 | + if ($this->has2Fighters()) { |
|
| 130 | + return true; |
|
| 131 | + } |
|
| 126 | 132 | // We aint in the first round, and there is 1 or 0 competitor |
| 127 | 133 | // We check children, and see : |
| 128 | 134 | // if there is 2 - 2 fighters -> undetermine, we cannot add it to fight list |
@@ -148,7 +154,9 @@ discard block |
||
| 148 | 154 | private function belongsToFirstRound() |
| 149 | 155 | { |
| 150 | 156 | $firstRoundFights = $this->group->championship->firstRoundFights->pluck('id')->toArray(); |
| 151 | - if (in_array($this->id, $firstRoundFights)) return true; |
|
| 157 | + if (in_array($this->id, $firstRoundFights)) { |
|
| 158 | + return true; |
|
| 159 | + } |
|
| 152 | 160 | return false; |
| 153 | 161 | } |
| 154 | 162 | |