Passed
Push — master ( 14ed1b...ecb8e9 )
by Julien
31:40
created
src/models/Championship.php 2 patches
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -157,8 +157,9 @@
 block discarded – undo
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;
Please login to merge, or discard this patch.
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -6,7 +6,6 @@
 block discarded – undo
6 6
 use Illuminate\Database\Eloquent\Relations\HasMany;
7 7
 use Illuminate\Database\Eloquent\SoftDeletes;
8 8
 use Illuminate\Foundation\Auth\User;
9
-use Illuminate\Support\Collection;
10 9
 
11 10
 class Championship extends Model
12 11
 {
Please login to merge, or discard this patch.
src/models/Team.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -45,7 +45,9 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
src/models/Competitor.php 1 patch
Braces   +12 added lines, -4 removed lines patch added patch discarded remove patch
@@ -86,15 +86,23 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
src/models/Fight.php 1 patch
Braces   +9 added lines, -3 removed lines patch added patch discarded remove patch
@@ -289,9 +289,15 @@
 block discarded – undo
289 289
      */
290 290
     public function getValueToUpdate()
291 291
     {
292
-        if ($this->c1 != null && $this->c2 != null) return null;
293
-        if ($this->c1 != null) return "c1";
294
-        if ($this->c2 != null) return "c2";
292
+        if ($this->c1 != null && $this->c2 != null) {
293
+            return null;
294
+        }
295
+        if ($this->c1 != null) {
296
+            return "c1";
297
+        }
298
+        if ($this->c2 != null) {
299
+            return "c2";
300
+        }
295 301
         return null;
296 302
     }
297 303
 }
298 304
\ No newline at end of file
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
@@ -206,7 +206,9 @@
 block discarded – undo
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
Please login to merge, or discard this patch.
src/TreeGen/DirectEliminationTreeGen.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -53,7 +53,9 @@
 block discarded – undo
53 53
         $matches = array_chunk($fighters, 2);
54 54
 
55 55
         //If there's already a match in the match array, then that means the next round is round 2, so increase the round number
56
-        if (count($this->brackets)) $roundNumber++;
56
+        if (count($this->brackets)) {
57
+            $roundNumber++;
58
+        }
57 59
 
58 60
         $countMatches = count($matches);
59 61
         //Create the first full round of fighters, some may be blank if waiting on the results of a previous round
Please login to merge, or discard this patch.
src/TreeGen/TreeGen.php 1 patch
Braces   +9 added lines, -3 removed lines patch added patch discarded remove patch
@@ -255,7 +255,9 @@  discard block
 block discarded – undo
255 255
     {
256 256
 
257 257
         $fighters = $fighters->pluck('id');
258
-        if ($shuffle) $fighters->shuffle();
258
+        if ($shuffle) {
259
+            $fighters->shuffle();
260
+        }
259 261
         $group = $this->saveGroup($area, $order, $round, $parent);
260 262
 
261 263
         // Add all competitors to Pivot Table
@@ -417,10 +419,14 @@  discard block
 block discarded – undo
417 419
     {
418 420
         if ($this->championship->hasPreliminary()) {
419 421
             $fightersGroup = $fightersByEntity->chunk($this->settings->preliminaryGroupSize);
420
-            if ($shuffle) $fightersGroup->shuffle();
422
+            if ($shuffle) {
423
+                $fightersGroup->shuffle();
424
+            }
421 425
         } elseif ($this->championship->isDirectEliminationType() || $round > 1) {
422 426
             $fightersGroup = $fightersByEntity->chunk(2);
423
-            if ($shuffle) $fightersGroup->shuffle();
427
+            if ($shuffle) {
428
+                $fightersGroup->shuffle();
429
+            }
424 430
         } else { // Round Robin
425 431
             $fightersGroup = $fightersByEntity->chunk($fightersByEntity->count());
426 432
         }
Please login to merge, or discard this patch.