@@ -21,6 +21,9 @@ discard block |
||
21 | 21 | |
22 | 22 | abstract protected function generateFights(); |
23 | 23 | |
24 | + /** |
|
25 | + * @param string|null $fighterToUpdate |
|
26 | + */ |
|
24 | 27 | abstract protected function addFighterToGroup(FightersGroup $group, $fighter, $fighterToUpdate); |
25 | 28 | |
26 | 29 | abstract protected function getByeGroup($fighters); |
@@ -84,7 +87,7 @@ discard block |
||
84 | 87 | * Get the size the first round will have. |
85 | 88 | * |
86 | 89 | * @param $fighterCount |
87 | - * @param $groupSize |
|
90 | + * @param integer $groupSize |
|
88 | 91 | * |
89 | 92 | * @return int |
90 | 93 | */ |
@@ -206,7 +209,7 @@ discard block |
||
206 | 209 | /** |
207 | 210 | * Logically build the tree ( attach a parent to every child for nestedSet Navigation ) |
208 | 211 | * |
209 | - * @param $numFighters |
|
212 | + * @param integer $numFighters |
|
210 | 213 | */ |
211 | 214 | protected function addParentToChildren($numFighters) |
212 | 215 | { |
@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | protected function getTreeSize($fighterCount, $groupSize) |
92 | 92 | { |
93 | 93 | $squareMultiplied = collect([1, 2, 4, 8, 16, 32, 64]) |
94 | - ->map(function ($item) use ($groupSize) { |
|
94 | + ->map(function($item) use ($groupSize) { |
|
95 | 95 | return $item * $groupSize; |
96 | 96 | }); // [4, 8, 16, 32, 64,...] |
97 | 97 | |
@@ -197,10 +197,10 @@ discard block |
||
197 | 197 | protected function getFightersByArea() |
198 | 198 | { |
199 | 199 | $areas = $this->settings->fightingAreas; |
200 | - $fighters = $this->getFighters(); // Get Competitor or Team Objects |
|
201 | - $fighterByEntity = $this->getFightersByEntity($fighters); // Chunk it by entities (Fede, Assoc, Club,...) |
|
202 | - $fightersWithBye = $this->adjustFightersGroupWithByes($fighters, $fighterByEntity); // Fill with Byes |
|
203 | - return $fightersWithBye->chunk(count($fightersWithBye) / $areas); // Chunk user by areas |
|
200 | + $fighters = $this->getFighters(); // Get Competitor or Team Objects |
|
201 | + $fighterByEntity = $this->getFightersByEntity($fighters); // Chunk it by entities (Fede, Assoc, Club,...) |
|
202 | + $fightersWithBye = $this->adjustFightersGroupWithByes($fighters, $fighterByEntity); // Fill with Byes |
|
203 | + return $fightersWithBye->chunk(count($fightersWithBye) / $areas); // Chunk user by areas |
|
204 | 204 | } |
205 | 205 | |
206 | 206 | /** |
@@ -28,7 +28,7 @@ |
||
28 | 28 | |
29 | 29 | public function build() |
30 | 30 | { |
31 | - $fighters = $this->groupsByRound->first()->map(function ($item) { |
|
31 | + $fighters = $this->groupsByRound->first()->map(function($item) { |
|
32 | 32 | $fighters = $item->getFightersWithBye(); |
33 | 33 | $fighter1 = $fighters->get(0); |
34 | 34 | $fighter2 = $fighters->get(1); |