Completed
Push — master ( 73c09f...9513c8 )
by Julien
02:02
created
src/TreeGen/TreeGen.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
     private function getMaxFightersByEntity($userGroups): int
84 84
     {
85 85
         return $userGroups
86
-            ->sortByDesc(function ($group) {
86
+            ->sortByDesc(function($group) {
87 87
                 return $group->count();
88 88
             })
89 89
             ->first()
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
     protected function getTreeSize($fighterCount, $groupSize)
122 122
     {
123 123
         $square = collect([1, 2, 4, 8, 16, 32, 64]);
124
-        $squareMultiplied = $square->map(function ($item) use ($groupSize) {
124
+        $squareMultiplied = $square->map(function($item) use ($groupSize) {
125 125
             return $item * $groupSize;
126 126
         });
127 127
 
@@ -439,8 +439,8 @@  discard block
 block discarded – undo
439 439
         $totalAreas = $this->settings->fightingAreas;
440 440
         $numFighters = $this->championship->fighters->count();
441 441
         $numGroups = $this->getTreeSize($numFighters, $this->championship->getGroupSize()) / 2; // 5 -> 8
442
-        $areaSize = $numGroups / ($totalAreas * pow(2,$round -1));
443
-        $numArea = intval(ceil($order / $areaSize )); // if round == 4, and second match 2/2 = 1 BAD
442
+        $areaSize = $numGroups / ($totalAreas * pow(2, $round - 1));
443
+        $numArea = intval(ceil($order / $areaSize)); // if round == 4, and second match 2/2 = 1 BAD
444 444
         return $numArea;
445 445
     }
446 446
 }
Please login to merge, or discard this patch.