Completed
Push — master ( df2731...5214c7 )
by Julien
02:35
created
src/models/Competitor.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -58,7 +58,9 @@
 block discarded – undo
58 58
      */
59 59
     private function defaultName()
60 60
     {
61
-        if ($this == null || $this->user == null) return "BYE";
61
+        if ($this == null || $this->user == null) {
62
+            return "BYE";
63
+        }
62 64
         return null;
63 65
     }
64 66
 
Please login to merge, or discard this patch.
src/models/FightersGroup.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -49,7 +49,9 @@
 block discarded – undo
49 49
     {
50 50
         foreach ($fightsByRound as $fight) {
51 51
             $parentGroup = $fight->group->parent;
52
-            if ($parentGroup == null) break;
52
+            if ($parentGroup == null) {
53
+                break;
54
+            }
53 55
             $parentFight = $parentGroup->fights->get(0); //TODO This Might change when extending to Preliminary
54 56
 
55 57
             // IN this $fight, is c1 or c2 has the info?
Please login to merge, or discard this patch.
src/models/Championship.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -169,8 +169,9 @@
 block discarded – undo
169 169
 
170 170
     public function buildName()
171 171
     {
172
-        if ($this->settings != null && $this->settings->alias != null)
173
-            return $this->settings->alias;
172
+        if ($this->settings != null && $this->settings->alias != null) {
173
+                    return $this->settings->alias;
174
+        }
174 175
 
175 176
         if ($this->hasNoCustomSettings()) {
176 177
             return $this->category->name;
Please login to merge, or discard this patch.
src/models/Fight.php 1 patch
Braces   +18 added lines, -6 removed lines patch added patch discarded remove patch
@@ -63,7 +63,9 @@  discard block
 block discarded – undo
63 63
      */
64 64
     private static function getActorsToFights(Championship $championship, FightersGroup $group = null)
65 65
     {
66
-        if ($group == null) return null;
66
+        if ($group == null) {
67
+            return null;
68
+        }
67 69
         $fighters = $group->getFighters();
68 70
         $fighterType = $group->getFighterType();
69 71
         if (sizeof($fighters) == 0) {
@@ -276,18 +278,26 @@  discard block
 block discarded – undo
276 278
      */
277 279
     public function hasDeterminedParent()
278 280
     {
279
-        if ($this->has2Fighters()) return true;
281
+        if ($this->has2Fighters()) {
282
+            return true;
283
+        }
280 284
         foreach ($this->group->children as $child) {
281 285
             $fight = $child->fights->get(0);
282
-            if ($fight->has2Fighters()) return false;
286
+            if ($fight->has2Fighters()) {
287
+                return false;
288
+            }
283 289
         }
284 290
         return true;
285 291
     }
286 292
 
287 293
     public function shouldBeInFightList()
288 294
     {
289
-        if ($this->belongsToFirstRound() && $this->dontHave2Fighters()) return false;
290
-        if ($this->has2Fighters()) return true;
295
+        if ($this->belongsToFirstRound() && $this->dontHave2Fighters()) {
296
+            return false;
297
+        }
298
+        if ($this->has2Fighters()) {
299
+            return true;
300
+        }
291 301
         // We aint in the first round, and there is 1 or 0 competitor
292 302
         // We check children, and see :
293 303
         // if there is 2  - 2 fighters -> undetermine, we cannot add it to fight list
@@ -313,7 +323,9 @@  discard block
 block discarded – undo
313 323
     private function belongsToFirstRound()
314 324
     {
315 325
         $firstRoundFights = $this->group->championship->firstRoundFights->pluck('id')->toArray();
316
-        if (in_array($this->id, $firstRoundFights)) return true;
326
+        if (in_array($this->id, $firstRoundFights)) {
327
+            return true;
328
+        }
317 329
         return false;
318 330
     }
319 331
 
Please login to merge, or discard this patch.