Completed
Push — master ( 0a3a64...75d382 )
by Julien
02:47
created
database/migrations/2016_10_24_223706_create_FightersGroup_table.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@
 block discarded – undo
13 13
      */
14 14
     public function up()
15 15
     {
16
-        Schema::create('fighters_groups', function (Blueprint $table) {
16
+        Schema::create('fighters_groups', function(Blueprint $table) {
17 17
             $table->increments('id');
18 18
             $table->tinyInteger('short_id')->unsigned()->nullable();
19 19
             $table->integer('championship_id')->unsigned()->index();
Please login to merge, or discard this patch.
database/seeds/CompetitorSeeder.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,5 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-use Faker\Factory as Faker;
4 3
 use Illuminate\Database\Seeder;
5 4
 use Illuminate\Foundation\Auth\User;
6 5
 use Xoco70\KendoTournaments\Models\Championship;
Please login to merge, or discard this patch.
src/models/Championship.php 2 patches
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.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -29,11 +29,11 @@  discard block
 block discarded – undo
29 29
     {
30 30
         parent::boot();
31 31
 
32
-        static::deleting(function ($championship) {
32
+        static::deleting(function($championship) {
33 33
             $championship->competitors()->delete();
34 34
             $championship->settings()->delete();
35 35
         });
36
-        static::restoring(function ($championship) {
36
+        static::restoring(function($championship) {
37 37
             $championship->competitors()->restore();
38 38
             $championship->settings()->restore();
39 39
         });
@@ -218,7 +218,7 @@  discard block
 block discarded – undo
218 218
      */
219 219
     public function groupsFromRound($round)
220 220
     {
221
-        return $this->fightersGroups()->where('round','>=', $round);
221
+        return $this->fightersGroups()->where('round', '>=', $round);
222 222
     }
223 223
 
224 224
     /**
Please login to merge, or discard this patch.
src/TreeGen/DirectEliminationTreeGen.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -6,7 +6,6 @@
 block discarded – undo
6 6
 use Illuminate\Support\Facades\App;
7 7
 use Xoco70\KendoTournaments\Models\Championship;
8 8
 use Xoco70\KendoTournaments\Models\DirectEliminationFight;
9
-use Xoco70\KendoTournaments\Models\Fight;
10 9
 
11 10
 class DirectEliminationTreeGen extends TreeGen
12 11
 {
Please login to merge, or discard this patch.
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/CreateDirectEliminationTree.php 2 patches
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.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@
 block discarded – undo
25 25
         $this->championship = $championship;
26 26
         $this->names = $names;
27 27
 
28
-        $this->firstRoundName = $names->first()->map(function ($item) use ($championship) {
28
+        $this->firstRoundName = $names->first()->map(function($item) use ($championship) {
29 29
             $fighters = $item->getFighters();
30 30
             $fighter1 = $fighters->get(0);
31 31
             $fighter2 = $fighters->get(1);
Please login to merge, or discard this patch.
src/TreeGen/PlayOffTreeGen.php 2 patches
Doc Comments   -1 removed lines patch added patch discarded remove patch
@@ -14,7 +14,6 @@
 block discarded – undo
14 14
 
15 15
     /**
16 16
      * Calculate the Byes need to fill the Championship Tree.
17
-     * @param Championship $championship
18 17
      * @param $fighters
19 18
      * @return Collection
20 19
      */
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\Support\Facades\App;
7 7
 use Xoco70\KendoTournaments\Models\Championship;
8 8
 use Xoco70\KendoTournaments\Models\DirectEliminationFight;
9
-use Xoco70\KendoTournaments\Models\Fight;
10 9
 use Xoco70\KendoTournaments\Models\PreliminaryFight;
11 10
 
12 11
 class PlayOffTreeGen extends TreeGen
Please login to merge, or discard this patch.
src/models/ChampionshipSettings.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@
 block discarded – undo
63 63
     public static function createOrUpdate(Request $request, Championship $championship): ChampionshipSettings
64 64
     {
65 65
         $request->request->add(['championship_id' => $championship->id]);
66
-        $arrSettings = $request->except('_token', 'numFighters','isTeam');
66
+        $arrSettings = $request->except('_token', 'numFighters', 'isTeam');
67 67
         $settings = static::where(['championship_id' => $championship->id])->first();
68 68
         if ($settings == null) {
69 69
             $settings = new self();
Please login to merge, or discard this patch.
resources/views/tree/index.blade.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@
 block discarded – undo
21 21
 $fightingAreas = $setting->fightingAreas;
22 22
 $fights = $championship->fights;
23 23
 $numFighters = $numFighters ??  5;
24
-$isTeam = $isTeam ??  5;;
24
+$isTeam = $isTeam ??  5; ;
25 25
 ?>
26 26
 @include('kendo-tournaments::partials.errors')
27 27
 
Please login to merge, or discard this patch.