Completed
Push — master ( 75d382...ae8aef )
by Julien
08:37
created
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/TreeGen/CreateDirectEliminationTree.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -233,7 +233,7 @@  discard block
 block discarded – undo
233 233
     }
234 234
 
235 235
     /**
236
-     * @param $roundNumber
236
+     * @param integer $roundNumber
237 237
      */
238 238
     private function assignFightersToBracket($roundNumber)
239 239
     {
@@ -258,7 +258,7 @@  discard block
 block discarded – undo
258 258
     /**
259 259
      * @param $selected
260 260
      * @param $fighter
261
-     * @param $html
261
+     * @param string $html
262 262
      * @return string
263 263
      */
264 264
     private function addOptionToSelect($selected, $fighter, $html): string
Please login to merge, or discard this patch.
resources/views/partials/tree/brackets/fight.blade.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -3,7 +3,9 @@
 block discarded – undo
3 3
 $top = \App\Bracket::getTopFight($numRound, $numFight) + $topOffset;
4 4
 
5 5
 $left = \App\Bracket::getLeftFight($numRound);
6
-if ($numRound== 3) dump(\App\Bracket::getTopFight($numRound, $numFight),$topOffset);
6
+if ($numRound== 3) {
7
+    dump(\App\Bracket::getTopFight($numRound, $numFight),$topOffset);
8
+}
7 9
 ?>
8 10
 
9 11
 <div class="match-wrapper" style="top: {{ $top }}px; left: {{$left}}px; width: 150px;">
Please login to merge, or discard this patch.
src/TreeGen/TreeGen.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -392,7 +392,9 @@
 block discarded – undo
392 392
     {
393 393
         foreach ($groupsByRound as $keyGroup => $group) {
394 394
             $parentGroup = $group->parent;
395
-            if ($parentGroup == null) break;
395
+            if ($parentGroup == null) {
396
+                break;
397
+            }
396 398
             $parentFight = $parentGroup->fights->get(0);
397 399
 
398 400
             // determine whether c1 or c2 must be updated
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
@@ -184,7 +184,9 @@
 block discarded – undo
184 184
             return false;
185 185
         }
186 186
         foreach ($this->children as $child) {
187
-            if (sizeof($child->fighters()) > 1) return false;
187
+            if (sizeof($child->fighters()) > 1) {
188
+                return false;
189
+            }
188 190
         }
189 191
         return true;
190 192
 
Please login to merge, or discard this patch.
src/models/Fight.php 1 patch
Braces   +12 added lines, -4 removed lines patch added patch discarded remove patch
@@ -46,7 +46,9 @@  discard block
 block discarded – undo
46 46
      */
47 47
     protected static function getFightersWithByes(FightersGroup $group)
48 48
     {
49
-        if ($group == null) return null;
49
+        if ($group == null) {
50
+            return null;
51
+        }
50 52
         $fighters = $group->getFighters();
51 53
         $fighterType = $group->getFighterType();
52 54
         if (sizeof($fighters) == 0) {
@@ -121,8 +123,12 @@  discard block
 block discarded – undo
121 123
 
122 124
     public function shouldBeInFightList()
123 125
     {
124
-        if ($this->belongsToFirstRound() && $this->dontHave2Fighters()) return false;
125
-        if ($this->has2Fighters()) return true;
126
+        if ($this->belongsToFirstRound() && $this->dontHave2Fighters()) {
127
+            return false;
128
+        }
129
+        if ($this->has2Fighters()) {
130
+            return true;
131
+        }
126 132
         // We aint in the first round, and there is 1 or 0 competitor
127 133
         // We check children, and see :
128 134
         // if there is 2  - 2 fighters -> undetermine, we cannot add it to fight list
@@ -148,7 +154,9 @@  discard block
 block discarded – undo
148 154
     private function belongsToFirstRound()
149 155
     {
150 156
         $firstRoundFights = $this->group->championship->firstRoundFights->pluck('id')->toArray();
151
-        if (in_array($this->id, $firstRoundFights)) return true;
157
+        if (in_array($this->id, $firstRoundFights)) {
158
+            return true;
159
+        }
152 160
         return false;
153 161
     }
154 162
 
Please login to merge, or discard this patch.
src/TreeGen/PlayOffTreeGen.php 1 patch
Doc Comments   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -15,7 +15,6 @@  discard block
 block discarded – undo
15 15
 
16 16
     /**
17 17
      * Calculate the Byes need to fill the Championship Tree.
18
-     * @param Championship $championship
19 18
      * @param $fighters
20 19
      * @return Collection
21 20
      */
@@ -65,7 +64,7 @@  discard block
 block discarded – undo
65 64
      * Chunk Fighters into groups for fighting, and optionnaly shuffle
66 65
      * @param $round
67 66
      * @param $fightersByEntity
68
-     * @return mixed
67
+     * @return Collection
69 68
      */
70 69
     protected function chunkAndShuffle($round, Collection $fightersByEntity)
71 70
     {
Please login to merge, or discard this patch.