Passed
Push — master ( fd9b73...b10af6 )
by Julien
05:30 queued 45s
created
src/models/FightersGroup.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -180,7 +180,7 @@
 block discarded – undo
180 180
     public function hasDeterminedParent()
181 181
     {
182 182
         // There is more than 1 fight, should be Preliminary
183
-        if (sizeof($this->fighters()) > 1){
183
+        if (sizeof($this->fighters()) > 1) {
184 184
             return false;
185 185
         }
186 186
         foreach ($this->children as $child) {
Please login to merge, or discard this patch.
src/TreeGen/CreateDirectEliminationTree.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@
 block discarded – undo
26 26
         $this->groupsByRound = $groupsByRound;
27 27
         $this->hasPreliminary = $hasPreliminary;
28 28
 
29
-        $this->firstRoundName = $groupsByRound->first()->map(function ($item) use ($championship) {
29
+        $this->firstRoundName = $groupsByRound->first()->map(function($item) use ($championship) {
30 30
             $fighters = $item->getFightersWithBye();
31 31
             $fighter1 = $fighters->get(0);
32 32
             $fighter2 = $fighters->get(1);
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/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.
database/migrations/2015_11_01_171759_create_Tournament_table.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@
 block discarded – undo
8 8
 {
9 9
     public function up()
10 10
     {
11
-        Schema::create('tournament', function (Blueprint $table) {
11
+        Schema::create('tournament', function(Blueprint $table) {
12 12
             $table->increments('id');
13 13
             //TODO Added ->nullable() to solve FK issue with Sqlite :(
14 14
             $table->Integer('user_id')->unsigned()->nullable()->index();
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
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
     private function getMaxFightersByEntity($userGroups): int
80 80
     {
81 81
         return $userGroups
82
-            ->sortByDesc(function ($group) {
82
+            ->sortByDesc(function($group) {
83 83
                 return $group->count();
84 84
             })
85 85
             ->first()
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
     protected function getTreeSize($fighterCount, $groupSize)
118 118
     {
119 119
         $squareMultiplied = collect([1, 2, 4, 8, 16, 32, 64])
120
-            ->map(function ($item) use ($groupSize) {
120
+            ->map(function($item) use ($groupSize) {
121 121
                 return $item * $groupSize;
122 122
             }); // [4, 8, 16, 32, 64,...]
123 123
 
@@ -302,7 +302,7 @@  discard block
 block discarded – undo
302 302
             throw new TreeGenerationException(trans('msg.min_competitor_required', ['number' => config('laravel-tournaments.MIN_COMPETITORS_X_AREA')]));
303 303
         }
304 304
 
305
-        if ($this->settings->hasPreliminary && $fighters->count() / ($this->settings->preliminaryGroupSize * $areas) < 1 ) {
305
+        if ($this->settings->hasPreliminary && $fighters->count() / ($this->settings->preliminaryGroupSize * $areas) < 1) {
306 306
             throw new TreeGenerationException(trans('msg.min_competitor_required', ['number' => config('laravel-tournaments.MIN_COMPETITORS_X_AREA')]));
307 307
         }
308 308
 
Please login to merge, or discard this patch.
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, 'laravel-tournaments');
21 21
 
22
-        $this->loadMigrationsFrom(__DIR__.'/../database/migrations');
23
-        $this->loadTranslationsFrom(__DIR__.'/../translations', 'laravel-tournaments');
22
+        $this->loadMigrationsFrom(__DIR__ . '/../database/migrations');
23
+        $this->loadTranslationsFrom(__DIR__ . '/../translations', 'laravel-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/laravel-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/laravel-tournaments')], 'assets');
29 29
 
30
-        $router->group(['prefix' => 'laravel-tournaments', 'middleware' => ['web']], function ($router) {
30
+        $router->group(['prefix' => 'laravel-tournaments', 'middleware' => ['web']], function($router) {
31 31
             $router->get('/', 'Xoco70\LaravelTournaments\TreeController@index')->name('tree.index');
32 32
             $router->post('/championships/{championship}/trees', 'Xoco70\LaravelTournaments\TreeController@store')->name('tree.store');
33 33
             $router->put('/championships/{championship}/trees', 'Xoco70\LaravelTournaments\TreeController@update')->name('tree.update');
Please login to merge, or discard this patch.
database/factories/TeamFactory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 use Xoco70\LaravelTournaments\Models\Team;
4
-$factory->define(Team::class, function (Faker\Generator $faker) {
4
+$factory->define(Team::class, function(Faker\Generator $faker) {
5 5
 
6 6
     return [
7 7
         'name' => $faker->name,
Please login to merge, or discard this patch.