@@ -157,8 +157,9 @@ |
||
| 157 | 157 | |
| 158 | 158 | public function buildName() |
| 159 | 159 | { |
| 160 | - if ($this->settings != null && $this->settings->alias != null && $this->settings->alias != '') |
|
| 161 | - return $this->settings->alias; |
|
| 160 | + if ($this->settings != null && $this->settings->alias != null && $this->settings->alias != '') { |
|
| 161 | + return $this->settings->alias; |
|
| 162 | + } |
|
| 162 | 163 | |
| 163 | 164 | if ($this->hasNoCustomSettings()) { |
| 164 | 165 | return $this->category->name; |
@@ -45,7 +45,9 @@ |
||
| 45 | 45 | |
| 46 | 46 | public function getName() |
| 47 | 47 | { |
| 48 | - if ($this == null) return "BYE"; |
|
| 48 | + if ($this == null) { |
|
| 49 | + return "BYE"; |
|
| 50 | + } |
|
| 49 | 51 | return $this->name; |
| 50 | 52 | } |
| 51 | 53 | |
@@ -86,15 +86,23 @@ |
||
| 86 | 86 | |
| 87 | 87 | public function getName() |
| 88 | 88 | { |
| 89 | - if ($this == null) return "BYE"; |
|
| 90 | - if ($this->user == null) return "BYE"; |
|
| 89 | + if ($this == null) { |
|
| 90 | + return "BYE"; |
|
| 91 | + } |
|
| 92 | + if ($this->user == null) { |
|
| 93 | + return "BYE"; |
|
| 94 | + } |
|
| 91 | 95 | return $this->user->name; |
| 92 | 96 | } |
| 93 | 97 | |
| 94 | 98 | public function getFullName() |
| 95 | 99 | { |
| 96 | - if ($this == null) return "BYE"; |
|
| 97 | - if ($this->user == null) return "BYE"; |
|
| 100 | + if ($this == null) { |
|
| 101 | + return "BYE"; |
|
| 102 | + } |
|
| 103 | + if ($this->user == null) { |
|
| 104 | + return "BYE"; |
|
| 105 | + } |
|
| 98 | 106 | return $this->user->firstname . " " . $this->user->lastname; |
| 99 | 107 | } |
| 100 | 108 | |
@@ -206,7 +206,9 @@ |
||
| 206 | 206 | foreach ($fightsByRound as $numFight => $fight) { |
| 207 | 207 | |
| 208 | 208 | $parentGroup = $fight->group->parent; |
| 209 | - if ($parentGroup == null) break; |
|
| 209 | + if ($parentGroup == null) { |
|
| 210 | + break; |
|
| 211 | + } |
|
| 210 | 212 | $parentFight = $parentGroup->fights->get(0); |
| 211 | 213 | |
| 212 | 214 | // IN this $fight, if it is the first child or the second child --> c1 or c2 in parent |
@@ -49,7 +49,7 @@ discard block |
||
| 49 | 49 | |
| 50 | 50 | /** |
| 51 | 51 | * Get the biggest entity group |
| 52 | - * @param $userGroups |
|
| 52 | + * @param Collection $userGroups |
|
| 53 | 53 | * |
| 54 | 54 | * @return int |
| 55 | 55 | */ |
@@ -68,6 +68,7 @@ discard block |
||
| 68 | 68 | * Get Competitor's list ordered by entities |
| 69 | 69 | * Countries for Internation Tournament, State for a National Tournament, etc. |
| 70 | 70 | * |
| 71 | + * @param Collection $fighters |
|
| 71 | 72 | * @return Collection |
| 72 | 73 | */ |
| 73 | 74 | private function getFightersByEntity($fighters): Collection |
@@ -153,7 +154,7 @@ discard block |
||
| 153 | 154 | |
| 154 | 155 | /** |
| 155 | 156 | * Repart BYE in the tree, |
| 156 | - * @param $fighterGroups |
|
| 157 | + * @param Collection $fighterGroups |
|
| 157 | 158 | * @param int $max |
| 158 | 159 | * |
| 159 | 160 | * @return Collection |
@@ -243,9 +244,9 @@ discard block |
||
| 243 | 244 | |
| 244 | 245 | /** |
| 245 | 246 | * @param $fighters |
| 246 | - * @param $area |
|
| 247 | + * @param integer $area |
|
| 247 | 248 | * @param integer $order |
| 248 | - * @param $round |
|
| 249 | + * @param integer $round |
|
| 249 | 250 | * @return FightersGroup |
| 250 | 251 | */ |
| 251 | 252 | public function saveGroupAndSync($fighters, $area, $order, $round, $parent, $shuffle) |
@@ -284,7 +285,7 @@ discard block |
||
| 284 | 285 | |
| 285 | 286 | /** |
| 286 | 287 | * @param $area |
| 287 | - * @param $order |
|
| 288 | + * @param integer $order |
|
| 288 | 289 | * @param $round |
| 289 | 290 | * @param $parent |
| 290 | 291 | * @return FightersGroup |
@@ -324,7 +325,7 @@ discard block |
||
| 324 | 325 | } |
| 325 | 326 | |
| 326 | 327 | /** |
| 327 | - * @param $fighters |
|
| 328 | + * @param Collection $fighters |
|
| 328 | 329 | * @param Collection $fighterGroups |
| 329 | 330 | * @return Collection |
| 330 | 331 | */ |
@@ -409,8 +410,8 @@ discard block |
||
| 409 | 410 | |
| 410 | 411 | /** |
| 411 | 412 | * Chunk Fighters into groups for fighting, and optionnaly shuffle |
| 412 | - * @param $round |
|
| 413 | - * @param $shuffle |
|
| 413 | + * @param integer $round |
|
| 414 | + * @param integer $shuffle |
|
| 414 | 415 | * @param $fightersByEntity |
| 415 | 416 | * @return mixed |
| 416 | 417 | */ |