Completed
Push — master ( 332511...198978 )
by Julien
02:42
created
src/TreeController.php 1 patch
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -10,8 +10,6 @@
 block discarded – undo
10 10
 use Xoco70\KendoTournaments\Models\Championship;
11 11
 use Xoco70\KendoTournaments\Models\ChampionshipSettings;
12 12
 use Xoco70\KendoTournaments\Models\Competitor;
13
-use Xoco70\KendoTournaments\Models\Fight;
14
-use Xoco70\KendoTournaments\Models\FightersGroup;
15 13
 use Xoco70\KendoTournaments\Models\Team;
16 14
 use Xoco70\KendoTournaments\Models\Tournament;
17 15
 
Please login to merge, or discard this patch.
src/TreeGen/DirectEliminationTreeGen.php 1 patch
Braces   +10 added lines, -4 removed lines patch added patch discarded remove patch
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
     {
71 71
         if ($this->championship->category->isTeam){
72 72
             $championship = $this->championship->withCount('teams', 'competitors')->find(2);
73
-        }else{
73
+        } else{
74 74
             $championship = $this->championship->withCount('teams', 'competitors')->first();
75 75
         }
76 76
 
@@ -90,7 +90,9 @@  discard block
 block discarded – undo
90 90
     {
91 91
         foreach ($fightsByRound as $fight) {
92 92
             $parentGroup = $fight->group->parent;
93
-            if ($parentGroup == null) break;
93
+            if ($parentGroup == null) {
94
+                break;
95
+            }
94 96
             $parentFight = $parentGroup->fights->get(0); //TODO This Might change when extending to Preliminary
95 97
 
96 98
             // IN this $fight, is c1 or c2 has the info?
@@ -164,10 +166,14 @@  discard block
 block discarded – undo
164 166
      */
165 167
     public function hasDeterminedParent()
166 168
     {
167
-        if ($this->group->has2Fighters()) return true;
169
+        if ($this->group->has2Fighters()) {
170
+            return true;
171
+        }
168 172
         foreach ($this->group->children as $child) {
169 173
             $fight = $child->fights->get(0);
170
-            if ($fight->has2Fighters()) return false;
174
+            if ($fight->has2Fighters()) {
175
+                return false;
176
+            }
171 177
         }
172 178
         return true;
173 179
     }
Please login to merge, or discard this patch.