Completed
Push — master ( 0a3a64...75d382 )
by Julien
02:47
created
src/TreeGen/TreeGen.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
     private function getMaxFightersByEntity($userGroups): int
62 62
     {
63 63
         return $userGroups
64
-            ->sortByDesc(function ($group) {
64
+            ->sortByDesc(function($group) {
65 65
                 return $group->count();
66 66
             })
67 67
             ->first()
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
     protected function getTreeSize($fighterCount, $groupSize)
100 100
     {
101 101
         $square = collect([1, 2, 4, 8, 16, 32, 64]);
102
-        $squareMultiplied = $square->map(function ($item) use ($groupSize) {
102
+        $squareMultiplied = $square->map(function($item) use ($groupSize) {
103 103
             return $item * $groupSize;
104 104
         });
105 105
 
@@ -411,7 +411,7 @@  discard block
 block discarded – undo
411 411
             $valueToUpdate = $group->getValueToUpdate(); // This should be OK
412 412
             if ($valueToUpdate != null) {
413 413
                 $fighterToUpdate = $group->getParentFighterToUpdate($keyGroup);
414
-                dump("key:".$keyGroup."-".$fighterToUpdate."=>".$valueToUpdate);
414
+                dump("key:" . $keyGroup . "-" . $fighterToUpdate . "=>" . $valueToUpdate);
415 415
                 $parentFight->$fighterToUpdate = $valueToUpdate;
416 416
                 $parentFight->save();
417 417
             }
Please login to merge, or discard this patch.
src/Models/PreliminaryFight.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -9,12 +9,12 @@
 block discarded – undo
9 9
 
10 10
     public function __construct(Fight $fight = null)
11 11
     {
12
-        if ($fight!=null){
13
-            $this->id= $fight->id;
14
-            $this->short_id= $fight->short_id;
15
-            $this->fighters_group_id= $fight->fighters_group_id;
16
-            $this->c1= $fight->c1;
17
-            $this->c2= $fight->c2;
12
+        if ($fight != null) {
13
+            $this->id = $fight->id;
14
+            $this->short_id = $fight->short_id;
15
+            $this->fighters_group_id = $fight->fighters_group_id;
16
+            $this->c1 = $fight->c1;
17
+            $this->c2 = $fight->c2;
18 18
         }
19 19
     }
20 20
 
Please login to merge, or discard this patch.
src/Models/DirectEliminationFight.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -9,12 +9,12 @@
 block discarded – undo
9 9
 {
10 10
     public function __construct(Fight $fight = null)
11 11
     {
12
-        if ($fight!=null){
13
-            $this->id= $fight->id;
14
-            $this->short_id= $fight->short_id;
15
-            $this->fighters_group_id= $fight->fighters_group_id;
16
-            $this->c1= $fight->c1;
17
-            $this->c2= $fight->c2;
12
+        if ($fight != null) {
13
+            $this->id = $fight->id;
14
+            $this->short_id = $fight->short_id;
15
+            $this->fighters_group_id = $fight->fighters_group_id;
16
+            $this->c1 = $fight->c1;
17
+            $this->c2 = $fight->c2;
18 18
         }
19 19
     }
20 20
     /**
Please login to merge, or discard this patch.
src/models/FightersGroup.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -180,7 +180,7 @@
 block discarded – undo
180 180
     public function hasDeterminedParent()
181 181
     {
182 182
         // There is more than 1 fight, should be Preliminary
183
-        if (sizeof($this->fighters()) > 1){
183
+        if (sizeof($this->fighters()) > 1) {
184 184
             return false;
185 185
         }
186 186
         foreach ($this->children as $child) {
Please login to merge, or discard this patch.