Test Failed
Push — master ( 46da36...84df0a )
by Julien
11:31
created
src/TournamentsServiceProvider.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -16,18 +16,18 @@
 block discarded – undo
16 16
      */
17 17
     public function boot(Router $router)
18 18
     {
19
-        $viewPath = __DIR__.'/../resources/views';
19
+        $viewPath = __DIR__ . '/../resources/views';
20 20
         $this->loadViewsFrom($viewPath, 'kendo-tournaments');
21 21
 
22
-        $this->loadMigrationsFrom(__DIR__.'/../database/migrations');
23
-        $this->loadTranslationsFrom(__DIR__.'/../translations', 'kendo-tournaments');
22
+        $this->loadMigrationsFrom(__DIR__ . '/../database/migrations');
23
+        $this->loadTranslationsFrom(__DIR__ . '/../translations', 'kendo-tournaments');
24 24
 
25
-        $this->publishes([__DIR__.'/../database/migrations' => $this->app->databasePath().'/migrations'], 'migrations');
26
-        $this->publishes([__DIR__.'/../database/seeds' => $this->app->databasePath().'/seeds'], 'seeds');
27
-        $this->publishes([__DIR__.'/../database/factories' => $this->app->databasePath().'/factories'], 'seeds');
28
-        $this->publishes([__DIR__.'/../resources/assets' => public_path('vendor/kendo-tournaments')], 'assets');
25
+        $this->publishes([__DIR__ . '/../database/migrations' => $this->app->databasePath() . '/migrations'], 'migrations');
26
+        $this->publishes([__DIR__ . '/../database/seeds' => $this->app->databasePath() . '/seeds'], 'seeds');
27
+        $this->publishes([__DIR__ . '/../database/factories' => $this->app->databasePath() . '/factories'], 'seeds');
28
+        $this->publishes([__DIR__ . '/../resources/assets' => public_path('vendor/kendo-tournaments')], 'assets');
29 29
 
30
-        $router->group(['prefix' => 'kendo-tournaments', 'middleware' => ['web']], function ($router) {
30
+        $router->group(['prefix' => 'kendo-tournaments', 'middleware' => ['web']], function($router) {
31 31
             $router->get('/', 'Xoco70\KendoTournaments\TreeController@index')->name('tree.index');
32 32
             $router->post('/championships/{championship}/trees', 'Xoco70\KendoTournaments\TreeController@store')->name('tree.store');
33 33
             $router->put('/championships/{championship}/trees', 'Xoco70\KendoTournaments\TreeController@update')->name('tree.update');
Please login to merge, or discard this patch.
resources/views/partials/tree/brackets/playerList.blade.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,10 +1,10 @@
 block discarded – undo
1 1
 <?php
2 2
 $prefix = "directElimination";
3
-if ($championship->hasPreliminary() && $numRound ==1){
3
+if ($championship->hasPreliminary() && $numRound == 1) {
4 4
     $prefix = "preliminary";
5 5
 }
6
-$className = $prefix."_select";
7
-$selectName = $prefix."_fighters[]";
6
+$className = $prefix . "_select";
7
+$selectName = $prefix . "_fighters[]";
8 8
 ?>
9 9
 <select name="{{ $selectName }}" class={{$className}}>
10 10
     <option {{ $selected == '' ? ' selected' : '' }} ></option>
Please login to merge, or discard this patch.
src/TreeGen/TreeGen.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
     private function getMaxFightersByEntity($userGroups): int
81 81
     {
82 82
         return $userGroups
83
-            ->sortByDesc(function ($group) {
83
+            ->sortByDesc(function($group) {
84 84
                 return $group->count();
85 85
             })
86 86
             ->first()
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
     protected function getTreeSize($fighterCount, $groupSize)
119 119
     {
120 120
         $squareMultiplied = collect([1, 2, 4, 8, 16, 32, 64])
121
-            ->map(function ($item) use ($groupSize) {
121
+            ->map(function($item) use ($groupSize) {
122 122
                 return $item * $groupSize;
123 123
             }); // [4, 8, 16, 32, 64,...]
124 124
 
@@ -305,7 +305,7 @@  discard block
 block discarded – undo
305 305
             throw new TreeGenerationException(trans('msg.min_competitor_required', ['number' => config('kendo-tournaments.MIN_COMPETITORS_X_AREA')]));
306 306
         }
307 307
 
308
-        if ($this->settings->hasPreliminary && $fighters->count() / ($this->settings->preliminaryGroupSize * $areas) < 1 ) {
308
+        if ($this->settings->hasPreliminary && $fighters->count() / ($this->settings->preliminaryGroupSize * $areas) < 1) {
309 309
             throw new TreeGenerationException(trans('msg.min_competitor_required', ['number' => config('kendo-tournaments.MIN_COMPETITORS_X_AREA')]));
310 310
         }
311 311
 
Please login to merge, or discard this patch.
src/Models/DirectEliminationFight.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -7,12 +7,12 @@
 block discarded – undo
7 7
     public function __construct(Fight $fight = null)
8 8
     {
9 9
         parent::__construct();
10
-        if ($fight!=null){
11
-            $this->id= $fight->id;
12
-            $this->short_id= $fight->short_id;
13
-            $this->fighters_group_id= $fight->fighters_group_id;
14
-            $this->c1= $fight->c1;
15
-            $this->c2= $fight->c2;
10
+        if ($fight != null) {
11
+            $this->id = $fight->id;
12
+            $this->short_id = $fight->short_id;
13
+            $this->fighters_group_id = $fight->fighters_group_id;
14
+            $this->c1 = $fight->c1;
15
+            $this->c2 = $fight->c2;
16 16
         }
17 17
     }
18 18
     /**
Please login to merge, or discard this patch.
src/Models/PreliminaryFight.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -10,12 +10,12 @@
 block discarded – undo
10 10
     public function __construct(Fight $fight = null)
11 11
     {
12 12
         parent::__construct();
13
-        if ($fight!=null){
14
-            $this->id= $fight->id;
15
-            $this->short_id= $fight->short_id;
16
-            $this->fighters_group_id= $fight->fighters_group_id;
17
-            $this->c1= $fight->c1;
18
-            $this->c2= $fight->c2;
13
+        if ($fight != null) {
14
+            $this->id = $fight->id;
15
+            $this->short_id = $fight->short_id;
16
+            $this->fighters_group_id = $fight->fighters_group_id;
17
+            $this->c1 = $fight->c1;
18
+            $this->c2 = $fight->c2;
19 19
         }
20 20
     }
21 21
 
Please login to merge, or discard this patch.
resources/views/tree/index.blade.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -20,8 +20,8 @@
 block discarded – undo
20 20
 $hasPreliminary = $setting->hasPreliminary;
21 21
 $fightingAreas = $setting->fightingAreas;
22 22
 $fights = $championship->fights;
23
-$numFighters = session()->has('numFighters')  ?  session('numFighters'):   5;
24
-$isTeam = session()->has('isTeam')  ?  session('isTeam'):   0;
23
+$numFighters = session()->has('numFighters') ?  session('numFighters') : 5;
24
+$isTeam = session()->has('isTeam') ?  session('isTeam') : 0;
25 25
 ?>
26 26
 @include('kendo-tournaments::partials.errors')
27 27
 
Please login to merge, or discard this patch.