@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | * |
38 | 38 | * @param Request $request |
39 | 39 | * |
40 | - * @return \Illuminate\Http\Response|string |
|
40 | + * @return \Illuminate\Http\RedirectResponse |
|
41 | 41 | */ |
42 | 42 | public function store(Request $request, $championshipId) |
43 | 43 | { |
@@ -137,6 +137,9 @@ discard block |
||
137 | 137 | return back(); |
138 | 138 | } |
139 | 139 | |
140 | + /** |
|
141 | + * @param integer $numFighter |
|
142 | + */ |
|
140 | 143 | public function getWinnerId($fighters, $scores, $numFighter) |
141 | 144 | { |
142 | 145 | return $scores[$numFighter] != null ? $fighters[$numFighter] : null; |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | /** |
58 | 58 | * Create empty groups after round 1. |
59 | 59 | * |
60 | - * @param $numFighters |
|
60 | + * @param integer $numFighters |
|
61 | 61 | */ |
62 | 62 | protected function pushEmptyGroupsToTree($numFighters) |
63 | 63 | { |
@@ -155,7 +155,7 @@ discard block |
||
155 | 155 | |
156 | 156 | /** |
157 | 157 | * @param Collection $usersByArea |
158 | - * @param $round |
|
158 | + * @param integer $round |
|
159 | 159 | */ |
160 | 160 | public function generateGroupsForRound(Collection $usersByArea, $round) |
161 | 161 | { |
@@ -22,8 +22,14 @@ discard block |
||
22 | 22 | abstract protected function generateFights(); |
23 | 23 | |
24 | 24 | |
25 | + /** |
|
26 | + * @param string|null $fighterToUpdate |
|
27 | + */ |
|
25 | 28 | abstract protected function addFighterToGroup(FightersGroup $group, $fighter, $fighterToUpdate); |
26 | 29 | |
30 | + /** |
|
31 | + * @return Collection |
|
32 | + */ |
|
27 | 33 | abstract protected function getByeGroup($fighters); |
28 | 34 | |
29 | 35 | abstract protected function getNumRounds($fightersCount); |
@@ -61,7 +67,7 @@ discard block |
||
61 | 67 | /** |
62 | 68 | * Get the biggest entity group. |
63 | 69 | * |
64 | - * @param $userGroups |
|
70 | + * @param Collection $userGroups |
|
65 | 71 | * |
66 | 72 | * @return int |
67 | 73 | */ |
@@ -130,7 +136,7 @@ discard block |
||
130 | 136 | /** |
131 | 137 | * Repart BYE in the tree,. |
132 | 138 | * |
133 | - * @param $fighterGroups |
|
139 | + * @param Collection $fighterGroups |
|
134 | 140 | * @param int $max |
135 | 141 | * |
136 | 142 | * @return Collection |
@@ -288,7 +294,7 @@ discard block |
||
288 | 294 | /** |
289 | 295 | * Attach a parent to every child for nestedSet Navigation. |
290 | 296 | * |
291 | - * @param $numFightersElim |
|
297 | + * @param integer $numFightersElim |
|
292 | 298 | */ |
293 | 299 | protected function addParentToChildren($numFightersElim) |
294 | 300 | { |
@@ -312,8 +318,8 @@ discard block |
||
312 | 318 | |
313 | 319 | /** |
314 | 320 | * @param Collection $fighters |
315 | - * @param $frequency |
|
316 | - * @param $sizeGroupBy |
|
321 | + * @param integer $frequency |
|
322 | + * @param integer $sizeGroupBy |
|
317 | 323 | * @param $bye |
318 | 324 | * |
319 | 325 | * @return Collection |
@@ -338,8 +344,8 @@ discard block |
||
338 | 344 | /** |
339 | 345 | * @param $frequency |
340 | 346 | * @param $sizeGroupBy |
341 | - * @param $count |
|
342 | - * @param $byeCount |
|
347 | + * @param integer $count |
|
348 | + * @param integer $byeCount |
|
343 | 349 | * |
344 | 350 | * @return bool |
345 | 351 | */ |
@@ -29,7 +29,7 @@ discard block |
||
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 |
||
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'); |
@@ -19,7 +19,7 @@ |
||
19 | 19 | /** |
20 | 20 | * Get User from Competitor. |
21 | 21 | * |
22 | - * @return mixed |
|
22 | + * @return \Illuminate\Database\Eloquent\Relations\BelongsTo |
|
23 | 23 | */ |
24 | 24 | public function user() |
25 | 25 | { |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | } |
42 | 42 | |
43 | 43 | /** |
44 | - * @param FightersGroup|null $group |
|
44 | + * @param FightersGroup $group |
|
45 | 45 | * |
46 | 46 | * @return Collection |
47 | 47 | */ |
@@ -151,6 +151,7 @@ discard block |
||
151 | 151 | } |
152 | 152 | |
153 | 153 | /** |
154 | + * @param boolean $default |
|
154 | 155 | * @return bool |
155 | 156 | */ |
156 | 157 | public function shouldBeInFightList($default) |
@@ -31,6 +31,9 @@ |
||
31 | 31 | return $this->name; |
32 | 32 | } |
33 | 33 | |
34 | + /** |
|
35 | + * @param string $attr |
|
36 | + */ |
|
34 | 37 | public function hasAttribute($attr) |
35 | 38 | { |
36 | 39 | return array_key_exists($attr, $this->attributes); |