Test Failed
Push — master ( f1e773...8db9fa )
by Julien
32:01 queued 20:51
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.
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -206,7 +206,7 @@
 block discarded – undo
206 206
 
207 207
     /**
208 208
      * Return Groups that belongs to the round in param
209
-     * @param $round
209
+     * @param integer $round
210 210
      * @return Collection
211 211
      */
212 212
     public function groupsByRound($round) : Collection
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/TreeGen/DirectEliminationTreeGen.php 1 patch
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -65,7 +65,9 @@  discard block
 block discarded – undo
65 65
         $matches = array_chunk($fighters, 2);
66 66
 
67 67
         //If there's already a match in the match array, then that means the next round is round 2, so increase the round number
68
-        if (count($this->brackets)) $roundNumber++;
68
+        if (count($this->brackets)) {
69
+            $roundNumber++;
70
+        }
69 71
 
70 72
         $countMatches = count($matches);
71 73
         //Create the first full round of fighters, some may be blank if waiting on the results of a previous round
@@ -80,7 +82,7 @@  discard block
 block discarded – undo
80 82
                 if ($this->championship->category->isTeam()){
81 83
                     $fighter1 = $this->names->get($roundNumber)[0]->fights[$matchNumber-1]->team1;
82 84
                     $fighter2 = $this->names->get($roundNumber)[0]->fights[$matchNumber-1]->team2;
83
-                }else{
85
+                } else{
84 86
                     $fighter1 = $this->names->get($roundNumber)[$matchNumber-1]->fights[0]->competitor1;
85 87
                     $fighter2 = $this->names->get($roundNumber)[$matchNumber-1]->fights[0]->competitor2;
86 88
                 }
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/TreeGen/TreeGen.php 1 patch
Doc Comments   +9 added lines, -5 removed lines patch added patch discarded remove patch
@@ -240,8 +240,9 @@  discard block
 block discarded – undo
240 240
     }
241 241
 
242 242
     /**
243
-     * @param $usersByArea
244
-     * @param $area
243
+     * @param Collection $usersByArea
244
+     * @param integer $area
245
+     * @param integer $round
245 246
      *
246 247
      */
247 248
     public function generateGroupsForRound($usersByArea, $area, $round)
@@ -335,6 +336,9 @@  discard block
 block discarded – undo
335 336
             : new Competitor();
336 337
     }
337 338
 
339
+    /**
340
+     * @param integer $groupSize
341
+     */
338 342
     public function createByeGroup($groupSize): Collection
339 343
     {
340 344
         $byeFighter = $this->createByeFighter();
@@ -347,7 +351,7 @@  discard block
 block discarded – undo
347 351
 
348 352
     /**
349 353
      * @param $fighters
350
-     * @param $fighterGroups
354
+     * @param Collection $fighterGroups
351 355
      * @return Collection
352 356
      */
353 357
     private function adjustFightersGroupWithByes($fighters, $fighterGroups): Collection
@@ -385,7 +389,7 @@  discard block
 block discarded – undo
385 389
      * @param $roundNumber
386 390
      * @param $numRounds
387 391
      * @param $matchNumber
388
-     * @param $previousRound
392
+     * @param Collection|null $previousRound
389 393
      * @return mixed
390 394
      */
391 395
     private function getParentGroup($roundNumber, $numRounds = 0, $matchNumber, $previousRound)
@@ -399,7 +403,7 @@  discard block
 block discarded – undo
399 403
     }
400 404
 
401 405
     /**
402
-     * @param $numRounds
406
+     * @param integer $numRounds
403 407
      * @param $numFightersEliminatory
404 408
      */
405 409
     private function pushGroups($numRounds, $numFightersEliminatory)
Please login to merge, or discard this patch.