@@ -152,7 +152,7 @@ |
||
| 152 | 152 | $teams = []; |
| 153 | 153 | if ($this instanceof WithRoundsInterface) { |
| 154 | 154 | $rounds = $this->getRounds(); |
| 155 | - for ($i = count($rounds) - 1; $i >= 0; $i--) { |
|
| 155 | + for ($i = count($rounds)-1; $i >= 0; $i--) { |
|
| 156 | 156 | foreach ($rounds[$i]->getTeams(true, $ordering) as $team) { |
| 157 | 157 | if (!isset($teams[$team->getId()])) { |
| 158 | 158 | $teams[$team->getId()] = $team; |
@@ -97,8 +97,7 @@ discard block |
||
| 97 | 97 | foreach ($this->getRounds() as $round) { |
| 98 | 98 | $teams[] = $round->getTeams(); |
| 99 | 99 | } |
| 100 | - } |
|
| 101 | - elseif ($this instanceof WithGroupsInterface) { |
|
| 100 | + } elseif ($this instanceof WithGroupsInterface) { |
|
| 102 | 101 | foreach ($this->getGroups() as $group) { |
| 103 | 102 | $teams[] = $group->getTeams(); |
| 104 | 103 | } |
@@ -160,8 +159,7 @@ discard block |
||
| 160 | 159 | } |
| 161 | 160 | $this->teams = array_values($teams); |
| 162 | 161 | } |
| 163 | - } |
|
| 164 | - elseif ($this instanceof WithGroupsInterface) { |
|
| 162 | + } elseif ($this instanceof WithGroupsInterface) { |
|
| 165 | 163 | foreach ($this->getGroups() as $group) { |
| 166 | 164 | $teams[] = $group->getTeams(true); |
| 167 | 165 | } |
@@ -170,11 +168,9 @@ discard block |
||
| 170 | 168 | |
| 171 | 169 | if ($this instanceof Round) { |
| 172 | 170 | $teams = Teams::sortRound($this->teams, $this, $ordering); |
| 173 | - } |
|
| 174 | - elseif ($this instanceof Group) { |
|
| 171 | + } elseif ($this instanceof Group) { |
|
| 175 | 172 | $teams = Teams::sortGroup($this->teams, $this, $ordering); |
| 176 | - } |
|
| 177 | - else { |
|
| 173 | + } else { |
|
| 178 | 174 | $teams = $this->teams; |
| 179 | 175 | } |
| 180 | 176 | $this->teams = $teams; |
@@ -201,8 +197,7 @@ discard block |
||
| 201 | 197 | if ($this instanceof WithGroupsInterface) { |
| 202 | 198 | $filter = new Filter($filters, $this->getGroups()); |
| 203 | 199 | $filter->filter($teams); |
| 204 | - } |
|
| 205 | - else if ($this instanceof Group) { |
|
| 200 | + } else if ($this instanceof Group) { |
|
| 206 | 201 | $filter = new Filter($filters, [$this]); |
| 207 | 202 | $filter->filter($teams); |
| 208 | 203 | } |