@@ -13,7 +13,7 @@ |
||
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(); |
@@ -1,6 +1,5 @@ |
||
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; |
@@ -169,8 +169,9 @@ |
||
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; |
@@ -29,11 +29,11 @@ discard block |
||
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 |
||
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 | /** |
@@ -6,7 +6,6 @@ |
||
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 | { |
@@ -10,8 +10,6 @@ |
||
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 |
@@ -233,7 +233,7 @@ discard block |
||
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 |
||
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 |
@@ -25,7 +25,7 @@ |
||
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); |
@@ -14,7 +14,6 @@ |
||
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 | */ |
@@ -6,7 +6,6 @@ |
||
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 |
@@ -63,7 +63,7 @@ |
||
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(); |
@@ -21,7 +21,7 @@ |
||
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 |