@@ -60,7 +60,7 @@ |
||
| 60 | 60 | * Chunk Fighters into groups for fighting, and optionnaly shuffle |
| 61 | 61 | * @param $round |
| 62 | 62 | * @param $fightersByEntity |
| 63 | - * @return mixed |
|
| 63 | + * @return Collection |
|
| 64 | 64 | */ |
| 65 | 65 | protected function chunkAndShuffle($round, Collection $fightersByEntity) |
| 66 | 66 | { |
@@ -20,8 +20,8 @@ |
||
| 20 | 20 | $hasPreliminary = $setting->hasPreliminary; |
| 21 | 21 | $fightingAreas = $setting->fightingAreas; |
| 22 | 22 | $fights = $championship->fights; |
| 23 | -$numFighters = session()->has('numFighters') ? session('numFighters'): 5; |
|
| 24 | -$isTeam = session()->has('isTeam') ? session('isTeam'): 0; |
|
| 23 | +$numFighters = session()->has('numFighters') ? session('numFighters') : 5; |
|
| 24 | +$isTeam = session()->has('isTeam') ? session('isTeam') : 0; |
|
| 25 | 25 | ?> |
| 26 | 26 | @include('kendo-tournaments::partials.errors') |
| 27 | 27 | |
@@ -63,8 +63,8 @@ |
||
| 63 | 63 | 'championships.category')->first(); |
| 64 | 64 | |
| 65 | 65 | return back() |
| 66 | - ->with('numFighters',$numFighters) |
|
| 67 | - ->with('isTeam',$isTeam); |
|
| 66 | + ->with('numFighters', $numFighters) |
|
| 67 | + ->with('isTeam', $isTeam); |
|
| 68 | 68 | |
| 69 | 69 | } |
| 70 | 70 | |
@@ -80,7 +80,7 @@ discard block |
||
| 80 | 80 | private function getMaxFightersByEntity($userGroups): int |
| 81 | 81 | { |
| 82 | 82 | return $userGroups |
| 83 | - ->sortByDesc(function ($group) { |
|
| 83 | + ->sortByDesc(function($group) { |
|
| 84 | 84 | return $group->count(); |
| 85 | 85 | }) |
| 86 | 86 | ->first() |
@@ -118,7 +118,7 @@ discard block |
||
| 118 | 118 | protected function getTreeSize($fighterCount, $groupSize) |
| 119 | 119 | { |
| 120 | 120 | $squareMultiplied = collect([1, 2, 4, 8, 16, 32, 64]) |
| 121 | - ->map(function ($item) use ($groupSize) { |
|
| 121 | + ->map(function($item) use ($groupSize) { |
|
| 122 | 122 | return $item * $groupSize; |
| 123 | 123 | }); // [4, 8, 16, 32, 64,...] |
| 124 | 124 | |
@@ -305,7 +305,7 @@ discard block |
||
| 305 | 305 | throw new TreeGenerationException(trans('msg.min_competitor_required', ['number' => config('kendo-tournaments.MIN_COMPETITORS_X_AREA')])); |
| 306 | 306 | } |
| 307 | 307 | |
| 308 | - if ($this->settings->hasPreliminary && $fighters->count() / ($this->settings->preliminaryGroupSize * $areas) < 1 ) { |
|
| 308 | + if ($this->settings->hasPreliminary && $fighters->count() / ($this->settings->preliminaryGroupSize * $areas) < 1) { |
|
| 309 | 309 | throw new TreeGenerationException(trans('msg.min_competitor_required', ['number' => config('kendo-tournaments.MIN_COMPETITORS_X_AREA')])); |
| 310 | 310 | } |
| 311 | 311 | |