@@ -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 [ |
@@ -13,7 +13,7 @@ |
||
13 | 13 | */ |
14 | 14 | public function up() |
15 | 15 | { |
16 | - Schema::create('sessions', function (Blueprint $table) { |
|
16 | + Schema::create('sessions', function(Blueprint $table) { |
|
17 | 17 | $table->string('id')->unique(); |
18 | 18 | $table->integer('user_id')->nullable(); |
19 | 19 | $table->string('ip_address', 45)->nullable(); |
@@ -13,7 +13,7 @@ |
||
13 | 13 | */ |
14 | 14 | public function up() |
15 | 15 | { |
16 | - Schema::create('round_competitor', function (Blueprint $table) { |
|
16 | + Schema::create('round_competitor', function(Blueprint $table) { |
|
17 | 17 | $table->increments('id'); |
18 | 18 | $table->integer('competitor_id')->unsigned()->nullable()->index(); |
19 | 19 | $table->integer('round_id')->unsigned()->index(); // A checar |
@@ -13,7 +13,7 @@ |
||
13 | 13 | */ |
14 | 14 | public function up() |
15 | 15 | { |
16 | - Schema::create('round_team', function (Blueprint $table) { |
|
16 | + Schema::create('round_team', function(Blueprint $table) { |
|
17 | 17 | $table->increments('id'); |
18 | 18 | $table->integer('team_id')->unsigned()->nullable()->index(); |
19 | 19 | $table->integer('round_id')->unsigned()->index(); // A checar |
@@ -70,7 +70,7 @@ |
||
70 | 70 | |
71 | 71 | // Delete previous fight for this championship |
72 | 72 | |
73 | - $arrRoundsId = $rounds->map(function ($value, $key) { |
|
73 | + $arrRoundsId = $rounds->map(function($value, $key) { |
|
74 | 74 | return $value->id; |
75 | 75 | })->toArray(); |
76 | 76 | Fight::destroy($arrRoundsId); |
@@ -63,7 +63,7 @@ |
||
63 | 63 | } |
64 | 64 | |
65 | 65 | /** |
66 | - * @param $settings |
|
66 | + * @param ChampionshipSettings $settings |
|
67 | 67 | * @param Championship $championship |
68 | 68 | */ |
69 | 69 | public static function generateFights(Collection $rounds, $settings, Championship $championship = null) |
@@ -4,7 +4,7 @@ |
||
4 | 4 | use Xoco70\KendoTournaments\Models\Championship; |
5 | 5 | use Xoco70\KendoTournaments\Models\Competitor; |
6 | 6 | |
7 | -$factory->define(Competitor::class, function (Faker\Generator $faker) { |
|
7 | +$factory->define(Competitor::class, function(Faker\Generator $faker) { |
|
8 | 8 | $tcs = Championship::all()->pluck('id')->toArray(); |
9 | 9 | $users = User::all()->pluck('id')->toArray(); |
10 | 10 |
@@ -89,7 +89,7 @@ discard block |
||
89 | 89 | /** |
90 | 90 | * Save a Fight. |
91 | 91 | * |
92 | - * @param Collection $rounds |
|
92 | + * @param \Illuminate\Support\Collection $rounds |
|
93 | 93 | * @param int $numRound |
94 | 94 | */ |
95 | 95 | public static function savePreliminaryFightRound($rounds, $numRound = 1) |
@@ -156,7 +156,7 @@ discard block |
||
156 | 156 | // } |
157 | 157 | |
158 | 158 | /** |
159 | - * @param Collection $rounds |
|
159 | + * @param \Illuminate\Support\Collection $rounds |
|
160 | 160 | */ |
161 | 161 | public static function saveRoundRobinFights(Championship $championship, $rounds) |
162 | 162 | { |
@@ -247,8 +247,8 @@ discard block |
||
247 | 247 | } |
248 | 248 | |
249 | 249 | /** |
250 | - * @param $usersByArea |
|
251 | - * @param $area |
|
250 | + * @param Collection $usersByArea |
|
251 | + * @param integer $area |
|
252 | 252 | * |
253 | 253 | * @return Collection |
254 | 254 | */ |
@@ -283,7 +283,7 @@ discard block |
||
283 | 283 | /** |
284 | 284 | * @param $area |
285 | 285 | * @param $fighters |
286 | - * @param $order |
|
286 | + * @param integer $order |
|
287 | 287 | * |
288 | 288 | * @return Round |
289 | 289 | */ |
@@ -150,7 +150,7 @@ discard block |
||
150 | 150 | private function getTreeSize($fighterCount, $groupSize) |
151 | 151 | { |
152 | 152 | $square = collect([1, 2, 4, 8, 16, 32, 64]); |
153 | - $squareMultiplied = $square->map(function ($item, $key) use ($groupSize) { |
|
153 | + $squareMultiplied = $square->map(function($item, $key) use ($groupSize) { |
|
154 | 154 | return $item * $groupSize; |
155 | 155 | }); |
156 | 156 | |
@@ -218,7 +218,7 @@ discard block |
||
218 | 218 | $sizeGroupBy = count($byeGroup); |
219 | 219 | |
220 | 220 | $frequency = $sizeGroupBy != 0 |
221 | - ? (int) floor($sizeFighters / $sizeGroupBy) |
|
221 | + ? (int)floor($sizeFighters / $sizeGroupBy) |
|
222 | 222 | : -1; |
223 | 223 | |
224 | 224 | // Create Copy of $competitors |