@@ -61,7 +61,7 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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 | } |
@@ -9,12 +9,12 @@ |
||
| 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 | |
@@ -9,12 +9,12 @@ |
||
| 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 | /** |
@@ -180,7 +180,7 @@ |
||
| 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) { |