@@ -23,11 +23,11 @@ |
||
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 | }); |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | private function getMaxFightersByEntity($userGroups): int |
56 | 56 | { |
57 | 57 | return $userGroups |
58 | - ->sortByDesc(function ($group) { |
|
58 | + ->sortByDesc(function($group) { |
|
59 | 59 | return $group->count(); |
60 | 60 | }) |
61 | 61 | ->first() |
@@ -93,7 +93,7 @@ discard block |
||
93 | 93 | protected function getTreeSize($fighterCount, $groupSize) |
94 | 94 | { |
95 | 95 | $square = collect([1, 2, 4, 8, 16, 32, 64]); |
96 | - $squareMultiplied = $square->map(function ($item) use ($groupSize) { |
|
96 | + $squareMultiplied = $square->map(function($item) use ($groupSize) { |
|
97 | 97 | return $item * $groupSize; |
98 | 98 | }); |
99 | 99 |
@@ -6,7 +6,6 @@ |
||
6 | 6 | use Illuminate\Support\Facades\App; |
7 | 7 | use Xoco70\KendoTournaments\Models\Championship; |
8 | 8 | use Xoco70\KendoTournaments\Models\DirectEliminationFight; |
9 | -use Xoco70\KendoTournaments\Models\Fight; |
|
10 | 9 | |
11 | 10 | abstract class DirectEliminationTreeGen extends TreeGen |
12 | 11 | { |
@@ -15,7 +15,6 @@ discard block |
||
15 | 15 | |
16 | 16 | /** |
17 | 17 | * Calculate the Byes need to fill the Championship Tree. |
18 | - * @param Championship $championship |
|
19 | 18 | * @param $fighters |
20 | 19 | * @return Collection |
21 | 20 | */ |
@@ -65,7 +64,7 @@ discard block |
||
65 | 64 | * Chunk Fighters into groups for fighting, and optionnaly shuffle |
66 | 65 | * @param $round |
67 | 66 | * @param $fightersByEntity |
68 | - * @return mixed |
|
67 | + * @return Collection |
|
69 | 68 | */ |
70 | 69 | protected function chunkAndShuffle($round, Collection $fightersByEntity) |
71 | 70 | { |
@@ -6,7 +6,6 @@ |
||
6 | 6 | use Illuminate\Support\Facades\App; |
7 | 7 | use Xoco70\KendoTournaments\Models\Championship; |
8 | 8 | use Xoco70\KendoTournaments\Models\DirectEliminationFight; |
9 | -use Xoco70\KendoTournaments\Models\Fight; |
|
10 | 9 | use Xoco70\KendoTournaments\Models\PreliminaryFight; |
11 | 10 | |
12 | 11 | abstract class PlayOffTreeGen extends TreeGen |