@@ -22,11 +22,11 @@ |
||
22 | 22 | { |
23 | 23 | parent::boot(); |
24 | 24 | |
25 | - static::deleting(function ($championship) { |
|
25 | + static::deleting(function($championship) { |
|
26 | 26 | $championship->competitors()->delete(); |
27 | 27 | $championship->settings()->delete(); |
28 | 28 | }); |
29 | - static::restoring(function ($championship) { |
|
29 | + static::restoring(function($championship) { |
|
30 | 30 | $championship->competitors()->restore(); |
31 | 31 | $championship->settings()->restore(); |
32 | 32 |
@@ -33,7 +33,7 @@ |
||
33 | 33 | 'gradeMax', |
34 | 34 | ]; |
35 | 35 | |
36 | - public function getAliasString(){ |
|
36 | + public function getAliasString() { |
|
37 | 37 | return $this->alias; |
38 | 38 | } |
39 | 39 |
@@ -59,14 +59,14 @@ |
||
59 | 59 | protected static function boot() |
60 | 60 | { |
61 | 61 | parent::boot(); |
62 | - static::deleting(function ($tournament) { |
|
62 | + static::deleting(function($tournament) { |
|
63 | 63 | foreach ($tournament->championships as $ct) { |
64 | 64 | $ct->delete(); |
65 | 65 | } |
66 | 66 | $tournament->invites()->delete(); |
67 | 67 | |
68 | 68 | }); |
69 | - static::restoring(function ($tournament) { |
|
69 | + static::restoring(function($tournament) { |
|
70 | 70 | |
71 | 71 | foreach ($tournament->championships()->withTrashed()->get() as $ct) { |
72 | 72 | $ct->restore(); |
@@ -5,7 +5,7 @@ |
||
5 | 5 | use Xoco70\KendoTournaments\Models\Championship; |
6 | 6 | use Xoco70\KendoTournaments\Models\Tournament; |
7 | 7 | |
8 | -$factory->define(Championship::class, function (Faker\Generator $faker) { |
|
8 | +$factory->define(Championship::class, function(Faker\Generator $faker) { |
|
9 | 9 | $tournaments = Tournament::all()->pluck('id')->toArray(); |
10 | 10 | $categories = Category::all()->pluck('id')->toArray(); |
11 | 11 |
@@ -4,7 +4,7 @@ |
||
4 | 4 | use Xoco70\KendoTournaments\Models\Championship; |
5 | 5 | use Xoco70\KendoTournaments\Models\ChampionshipSettings; |
6 | 6 | |
7 | -$factory->define(ChampionshipSettings::class, function (Faker\Generator $faker) use ($factory) { |
|
7 | +$factory->define(ChampionshipSettings::class, function(Faker\Generator $faker) use ($factory) { |
|
8 | 8 | $tcs = Championship::all()->pluck('id')->toArray(); |
9 | 9 | |
10 | 10 | return [ |
@@ -2,7 +2,7 @@ |
||
2 | 2 | |
3 | 3 | use Xoco70\KendoTournaments\Models\Venue; |
4 | 4 | |
5 | -$factory->define(Venue::class, function (Faker\Generator $faker) { |
|
5 | +$factory->define(Venue::class, function(Faker\Generator $faker) { |
|
6 | 6 | |
7 | 7 | return [ |
8 | 8 | 'venue_name' => $faker->colorName, |
@@ -12,7 +12,7 @@ |
||
12 | 12 | */ |
13 | 13 | |
14 | 14 | /** @var \Illuminate\Database\Eloquent\Factory $factory */ |
15 | -$factory->define(App\User::class, function (Faker\Generator $faker) { |
|
15 | +$factory->define(App\User::class, function(Faker\Generator $faker) { |
|
16 | 16 | static $password; |
17 | 17 | |
18 | 18 | return [ |
@@ -3,7 +3,7 @@ discard block |
||
3 | 3 | |
4 | 4 | use Xoco70\KendoTournaments\Models\Category; |
5 | 5 | |
6 | -$factory->define(Category::class, function (Faker\Generator $faker) { |
|
6 | +$factory->define(Category::class, function(Faker\Generator $faker) { |
|
7 | 7 | $name = ['categories.junior', |
8 | 8 | 'categories.junior_team', |
9 | 9 | 'categories.men_single', |
@@ -18,7 +18,7 @@ discard block |
||
18 | 18 | 'name' => $faker->randomElement($name), |
19 | 19 | 'alias' => $faker->word, |
20 | 20 | 'gender' => $faker->randomElement($gender), |
21 | - 'isTeam' => $faker->numberBetween(0,1), |
|
21 | + 'isTeam' => $faker->numberBetween(0, 1), |
|
22 | 22 | 'ageCategory' => $faker->numberBetween(0, 5), |
23 | 23 | 'ageMin' => $faker->numberBetween(1, 90), |
24 | 24 | 'ageMax' => $faker->numberBetween(1, 90), |
@@ -38,7 +38,7 @@ |
||
38 | 38 | $table->tinyInteger('teamReserve')->nullable(); // Default is null |
39 | 39 | |
40 | 40 | // Seed |
41 | - $table->smallInteger('seedQuantity')->nullable(); // Competitors seeded in tree |
|
41 | + $table->smallInteger('seedQuantity')->nullable(); // Competitors seeded in tree |
|
42 | 42 | |
43 | 43 | |
44 | 44 | //TODO This should go in another table that is not for tree construction but for rules |