Passed
Push — master ( 1c4bf0...cbe06d )
by Tomáš
02:43
created
src/TournamentGenerator/Round.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -151,8 +151,7 @@  discard block
 block discarded – undo
151 151
 		$teams = $this->getTeams(true, Constants::SEED);
152 152
 		if ($this::isSeeded($teams)) {
153 153
 			Functions::sortAlternate($teams);
154
-		}
155
-		else {
154
+		} else {
156 155
 			shuffle($teams);
157 156
 		}
158 157
 
@@ -182,8 +181,7 @@  discard block
 block discarded – undo
182 181
 		$teams = $this->getTeams(true, Constants::SEED);
183 182
 		if ($this::isSeeded($teams)) {
184 183
 			Functions::sortAlternate($teams);
185
-		}
186
-		else {
184
+		} else {
187 185
 			shuffle($teams);
188 186
 		}
189 187
 
Please login to merge, or discard this patch.
src/TournamentGenerator/Preset/DoubleElimination.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -263,16 +263,14 @@  discard block
 block discarded – undo
263 263
 				if (($roundNum === 2 && !$extraStart) || ($roundNum === 3 && $extraStart)) {
264 264
 					$previousWinningGroups[2 * ($g - 1)]->progression($group, 1, 1);
265 265
 					$previousWinningGroups[(2 * ($g - 1)) + 1]->progression($group, 1, 1);
266
-				}
267
-				elseif ($teamsTotal >= 2) {
266
+				} elseif ($teamsTotal >= 2) {
268 267
 					$key = 2 * ($g - 1);
269 268
 					$progressGroups[$key][0]->progression($group, $progressGroups[$key][1], 1);
270 269
 					$key++;
271 270
 					$progressGroups[$key][0]->progression($group, $progressGroups[$key][1], 1);
272 271
 				}
273 272
 			}
274
-		}
275
-		else {
273
+		} else {
276 274
 			// Calculate byes
277 275
 			$nextPowerOf2 = Functions::nextPowerOf2($teamsTotal);
278 276
 			$losingByes = $nextPowerOf2 - $teamsTotal;
@@ -320,8 +318,7 @@  discard block
 block discarded – undo
320 318
 					$str .= '| '.implode(' | ', array_map(static function(Team $team) {
321 319
 							return $team->getName();
322 320
 						}, $group->getTeams())).' |'.PHP_EOL;
323
-				}
324
-				else {
321
+				} else {
325 322
 					foreach ($group->getGames() as $game) {
326 323
 						$str .= '| '.implode(' | ', array_map(static function(Team $team) use ($game) {
327 324
 								return ($team->getId() === $game->getWin() ? "\e[1m\e[4m" : '').$team->getName()."\e[0m";
Please login to merge, or discard this patch.
src/TournamentGenerator/Traits/WithTeams.php 1 patch
Braces   +4 added lines, -8 removed lines patch added patch discarded remove patch
@@ -61,8 +61,7 @@  discard block
 block discarded – undo
61 61
 		$teams = $this->getTeams(true, Constants::SEED);
62 62
 		if ($this::isSeeded($teams)) {
63 63
 			Functions::sortAlternate($teams);
64
-		}
65
-		else {
64
+		} else {
66 65
 			shuffle($teams);
67 66
 		}
68 67
 
@@ -95,8 +94,7 @@  discard block
 block discarded – undo
95 94
 		$teams = $this->getTeams(true, Constants::SEED);
96 95
 		if ($this::isSeeded($teams)) {
97 96
 			Functions::sortAlternate($teams);
98
-		}
99
-		else {
97
+		} else {
100 98
 			shuffle($teams);
101 99
 		}
102 100
 
@@ -129,8 +127,7 @@  discard block
 block discarded – undo
129 127
 		}
130 128
 		if ($ordered) {
131 129
 			$returnTeams = $this->sortTeams($ordering);
132
-		}
133
-		else {
130
+		} else {
134 131
 			$returnTeams = $this->teams->unique()->get();
135 132
 		}
136 133
 
@@ -180,8 +177,7 @@  discard block
 block discarded – undo
180 177
 		if ($this instanceof WithGroupsInterface) {
181 178
 			$filter = new Filter($filters, $this->getGroups());
182 179
 			$filter->filter($teams);
183
-		}
184
-		else if ($this instanceof Group) {
180
+		} else if ($this instanceof Group) {
185 181
 			$filter = new Filter($filters, [$this]);
186 182
 			$filter->filter($teams);
187 183
 		}
Please login to merge, or discard this patch.