@@ -1,10 +1,10 @@ |
||
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> |
@@ -80,7 +80,7 @@ discard block |
||
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 |
||
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 |
||
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 |
@@ -7,12 +7,12 @@ |
||
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 | /** |
@@ -10,12 +10,12 @@ |
||
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 |
@@ -20,8 +20,8 @@ |
||
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 |
@@ -8,7 +8,7 @@ |
||
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(); |