Completed
Push — master ( 75d382...ae8aef )
by Julien
08:37
created
src/models/Championship.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -23,11 +23,11 @@
 block discarded – undo
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
         });
Please login to merge, or discard this patch.
src/TreeGen/TreeGen.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 
Please login to merge, or discard this patch.
src/TreeGen/DirectEliminationTreeGen.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -6,7 +6,6 @@
 block discarded – undo
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
 {
Please login to merge, or discard this patch.
src/TreeGen/PlayOffTreeGen.php 2 patches
Doc Comments   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -15,7 +15,6 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
     {
Please login to merge, or discard this patch.
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -6,7 +6,6 @@
 block discarded – undo
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
Please login to merge, or discard this patch.