Passed
Branch develop (f993a2)
by Julien
06:23
created
src/TreeGen/SingleEliminationCompetitorTreeGen.php 2 patches
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -3,8 +3,6 @@
 block discarded – undo
3 3
 namespace Xoco70\LaravelTournaments\TreeGen;
4 4
 
5 5
 use Illuminate\Support\Collection;
6
-use Xoco70\LaravelTournaments\Exceptions\DuplicatedException;
7
-use Xoco70\LaravelTournaments\Exceptions\DuplicatedFighterException;
8 6
 use Xoco70\LaravelTournaments\Models\Competitor;
9 7
 use Xoco70\LaravelTournaments\Models\Fight;
10 8
 use Xoco70\LaravelTournaments\Models\FighterGroupCompetitor;
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -83,8 +83,8 @@
 block discarded – undo
83 83
     protected function updateGroupFighters(FightersGroup $group, Fight $fight, $oldCompetitors)
84 84
     {
85 85
 
86
-        for ($num = 0; $num <=1;$num++){
87
-            $c1or2 = "c".($num+1);
86
+        for ($num = 0; $num <= 1; $num++) {
87
+            $c1or2 = "c" . ($num + 1);
88 88
             $fgc = FighterGroupCompetitor::where('fighters_group_id', $group->id)
89 89
                 ->where('competitor_id', $oldCompetitors[$num])
90 90
                 ->first();
Please login to merge, or discard this patch.
src/TreeGen/TreeGen.php 2 patches
Doc Comments   +14 added lines, -8 removed lines patch added patch discarded remove patch
@@ -34,8 +34,14 @@  discard block
 block discarded – undo
34 34
 
35 35
     abstract protected function generateGroupsForRound(Collection $fightersByArea, $round);
36 36
 
37
+    /**
38
+     * @return Collection
39
+     */
37 40
     abstract protected function getByeGroup($fighters);
38 41
 
42
+    /**
43
+     * @param integer $fighterId
44
+     */
39 45
     abstract protected function getFighter($fighterId);
40 46
 
41 47
     abstract protected function getFighters();
@@ -114,7 +120,7 @@  discard block
 block discarded – undo
114 120
     /**
115 121
      * Get the biggest entity group.
116 122
      *
117
-     * @param $userGroups
123
+     * @param Collection $userGroups
118 124
      *
119 125
      * @return int
120 126
      */
@@ -182,7 +188,7 @@  discard block
 block discarded – undo
182 188
     /**
183 189
      * Repart BYE in the tree,.
184 190
      *
185
-     * @param $fighterGroups
191
+     * @param Collection $fighterGroups
186 192
      * @param int $max
187 193
      *
188 194
      * @return Collection
@@ -342,7 +348,7 @@  discard block
 block discarded – undo
342 348
     /**
343 349
      * Attach a parent to every child for nestedSet Navigation.
344 350
      *
345
-     * @param $numFightersElim
351
+     * @param integer $numFightersElim
346 352
      */
347 353
     protected function addParentToChildren($numFightersElim)
348 354
     {
@@ -366,8 +372,8 @@  discard block
 block discarded – undo
366 372
 
367 373
     /**
368 374
      * @param Collection $fighters
369
-     * @param $frequency
370
-     * @param $sizeGroupBy
375
+     * @param integer $frequency
376
+     * @param integer $sizeGroupBy
371 377
      * @param $bye
372 378
      *
373 379
      * @return Collection
@@ -392,8 +398,8 @@  discard block
 block discarded – undo
392 398
     /**
393 399
      * @param $frequency
394 400
      * @param $sizeGroupBy
395
-     * @param $count
396
-     * @param $byeCount
401
+     * @param integer $count
402
+     * @param integer $byeCount
397 403
      *
398 404
      * @return bool
399 405
      */
@@ -511,7 +517,7 @@  discard block
 block discarded – undo
511 517
 
512 518
     /**
513 519
      * @param $fighters
514
-     * @param $numFighter
520
+     * @param integer $numFighter
515 521
      * @param $fight
516 522
      * @param $winners
517 523
      * @return int
Please login to merge, or discard this patch.
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -7,7 +7,6 @@
 block discarded – undo
7 7
 use Illuminate\Http\Request;
8 8
 use Illuminate\Support\Facades\DB;
9 9
 use Xoco70\LaravelTournaments\Contracts\TreeGenerable;
10
-use Xoco70\LaravelTournaments\Exceptions\DuplicatedException;
11 10
 use Xoco70\LaravelTournaments\Exceptions\DuplicatedFighterException;
12 11
 use Xoco70\LaravelTournaments\Exceptions\TreeGenerationException;
13 12
 use Xoco70\LaravelTournaments\Models\Championship;
Please login to merge, or discard this patch.
src/TreeGen/SingleEliminationTeamTreeGen.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -82,8 +82,8 @@
 block discarded – undo
82 82
     protected function updateGroupFighters(FightersGroup $group, Fight $fight, $oldTeams)
83 83
     {
84 84
 
85
-        for ($num = 0; $num <=1;$num++){
86
-            $c1or2 = "c".($num+1);
85
+        for ($num = 0; $num <= 1; $num++) {
86
+            $c1or2 = "c" . ($num + 1);
87 87
             $fgc = FighterGroupTeam::where('fighters_group_id', $group->id)
88 88
                 ->where('team_id', $oldTeams[$num])
89 89
                 ->first();
Please login to merge, or discard this patch.
resources/views/partials/tree/brackets/playerList.blade.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,9 +1,9 @@
 block discarded – undo
1 1
 <?php
2 2
 $prefix = "singleElimination";
3
-if ($championship->hasPreliminary() && $roundNumber ==1){
3
+if ($championship->hasPreliminary() && $roundNumber == 1) {
4 4
     $prefix = "preliminary";
5 5
 }
6
-$className = $prefix."_select";
6
+$className = $prefix . "_select";
7 7
 
8 8
 ?>
9 9
 <!-- r = round, m = match, f = fighter -->
Please login to merge, or discard this patch.