Completed
Push — master ( 753a4f...ea89cb )
by Julien
07:32
created
src/TreeGen/PlayOffTreeGen.php 1 patch
Doc Comments   +4 added lines, -1 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
      *
30 30
      * @param $fightersByEntity
31 31
      *
32
-     * @return mixed
32
+     * @return Collection
33 33
      */
34 34
     protected function chunkAndShuffle(Collection $fightersByEntity)
35 35
     {
@@ -104,6 +104,9 @@  discard block
 block discarded – undo
104 104
         $this->generateGroupsForRound($fighters, 1);
105 105
     }
106 106
 
107
+    /**
108
+     * @param integer $round
109
+     */
107 110
     protected function generateGroupsForRound(Collection $fightersByArea, $round)
108 111
     {
109 112
         $fightersId = $fightersByArea->pluck('id');
Please login to merge, or discard this patch.
src/TreeGen/TreeGen.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
     private function getMaxFightersByEntity($userGroups): int
69 69
     {
70 70
         return $userGroups
71
-            ->sortByDesc(function ($group) {
71
+            ->sortByDesc(function($group) {
72 72
                 return $group->count();
73 73
             })
74 74
             ->first()
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
     protected function getTreeSize($fighterCount, $groupSize)
108 108
     {
109 109
         $squareMultiplied = collect([1, 2, 4, 8, 16, 32, 64])
110
-            ->map(function ($item) use ($groupSize) {
110
+            ->map(function($item) use ($groupSize) {
111 111
                 return $item * $groupSize;
112 112
             }); // [4, 8, 16, 32, 64,...]
113 113
 
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
         $sizeGroupBy = count($byeGroup);
166 166
 
167 167
         $frequency = $sizeGroupBy != 0
168
-            ? (int) floor($sizeFighters / $sizeGroupBy)
168
+            ? (int)floor($sizeFighters / $sizeGroupBy)
169 169
             : -1;
170 170
 
171 171
         // Create Copy of $competitors
@@ -355,7 +355,7 @@  discard block
 block discarded – undo
355 355
     {
356 356
         // Delete previous fight for this championship
357 357
         $arrGroupsId = $this->championship->fightersGroups()->get()->pluck('id');
358
-        if (sizeof($arrGroupsId) > 0){
358
+        if (sizeof($arrGroupsId) > 0) {
359 359
             Fight::destroy($arrGroupsId);
360 360
         }
361 361
     }
Please login to merge, or discard this patch.