@@ -206,7 +206,7 @@ |
||
206 | 206 | |
207 | 207 | /** |
208 | 208 | * Return Groups that belongs to the round in param |
209 | - * @param $round |
|
209 | + * @param integer $round |
|
210 | 210 | * @return Collection |
211 | 211 | */ |
212 | 212 | public function groupsByRound($round) : Collection |
@@ -23,11 +23,11 @@ discard block |
||
23 | 23 | { |
24 | 24 | parent::boot(); |
25 | 25 | |
26 | - static::deleting(function ($championship) { |
|
26 | + static::deleting(function($championship) { |
|
27 | 27 | $championship->competitors()->delete(); |
28 | 28 | $championship->settings()->delete(); |
29 | 29 | }); |
30 | - static::restoring(function ($championship) { |
|
30 | + static::restoring(function($championship) { |
|
31 | 31 | $championship->competitors()->restore(); |
32 | 32 | $championship->settings()->restore(); |
33 | 33 | }); |
@@ -211,6 +211,6 @@ discard block |
||
211 | 211 | */ |
212 | 212 | public function groupsByRound($round) : Collection |
213 | 213 | { |
214 | - return $this->fightersGroups()->where('round',$round)->get(); |
|
214 | + return $this->fightersGroups()->where('round', $round)->get(); |
|
215 | 215 | } |
216 | 216 | } |
@@ -240,8 +240,9 @@ discard block |
||
240 | 240 | } |
241 | 241 | |
242 | 242 | /** |
243 | - * @param $usersByArea |
|
244 | - * @param $area |
|
243 | + * @param Collection $usersByArea |
|
244 | + * @param integer $area |
|
245 | + * @param integer $round |
|
245 | 246 | * |
246 | 247 | */ |
247 | 248 | public function generateGroupsForRound($usersByArea, $area, $round) |
@@ -335,6 +336,9 @@ discard block |
||
335 | 336 | : new Competitor(); |
336 | 337 | } |
337 | 338 | |
339 | + /** |
|
340 | + * @param integer $groupSize |
|
341 | + */ |
|
338 | 342 | public function createByeGroup($groupSize): Collection |
339 | 343 | { |
340 | 344 | $byeFighter = $this->createByeFighter(); |
@@ -347,7 +351,7 @@ discard block |
||
347 | 351 | |
348 | 352 | /** |
349 | 353 | * @param $fighters |
350 | - * @param $fighterGroups |
|
354 | + * @param Collection $fighterGroups |
|
351 | 355 | * @return Collection |
352 | 356 | */ |
353 | 357 | private function adjustFightersGroupWithByes($fighters, $fighterGroups): Collection |
@@ -385,7 +389,7 @@ discard block |
||
385 | 389 | * @param $roundNumber |
386 | 390 | * @param $numRounds |
387 | 391 | * @param $matchNumber |
388 | - * @param $previousRound |
|
392 | + * @param Collection|null $previousRound |
|
389 | 393 | * @return mixed |
390 | 394 | */ |
391 | 395 | private function getParentGroup($roundNumber, $numRounds = 0, $matchNumber, $previousRound) |
@@ -399,7 +403,7 @@ discard block |
||
399 | 403 | } |
400 | 404 | |
401 | 405 | /** |
402 | - * @param $numRounds |
|
406 | + * @param integer $numRounds |
|
403 | 407 | * @param $numFightersEliminatory |
404 | 408 | */ |
405 | 409 | private function pushGroups($numRounds, $numFightersEliminatory) |
@@ -74,12 +74,12 @@ |
||
74 | 74 | FightersGroup::generateFights($championship); |
75 | 75 | } catch (TreeGenerationException $e) { |
76 | 76 | redirect()->back() |
77 | - ->withErrors([$numFighters ."-".$e->getMessage()]); |
|
77 | + ->withErrors([$numFighters . "-" . $e->getMessage()]); |
|
78 | 78 | } |
79 | 79 | |
80 | 80 | return redirect()->back() |
81 | 81 | ->with('numFighters', $numFighters) |
82 | 82 | ->with('hasPreliminary', $championship->settings->hasPreliminary) |
83 | - ->with(['success' , "Success"]); |
|
83 | + ->with(['success', "Success"]); |
|
84 | 84 | } |
85 | 85 | } |