Completed
Push — master ( 1b67ee...4e860c )
by Julien
02:07
created
src/TreeGen/PlayOffTreeGen.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@
 block discarded – undo
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
     {
Please login to merge, or discard this patch.
resources/views/tree/index.blade.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -20,8 +20,8 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
src/TreeController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -63,8 +63,8 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
src/TreeGen/TreeGen.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 
Please login to merge, or discard this patch.