@@ -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 |
@@ -105,7 +105,7 @@ discard block |
||
| 105 | 105 | $round->teams()->sync($fighters); |
| 106 | 106 | } else { |
| 107 | 107 | $round->competitors()->detach(); |
| 108 | - foreach ($fighters as $fighter){ |
|
| 108 | + foreach ($fighters as $fighter) { |
|
| 109 | 109 | $round->competitors()->attach($fighter); |
| 110 | 110 | } |
| 111 | 111 | // $round->competitors()->sync($fighters); |
@@ -208,7 +208,7 @@ discard block |
||
| 208 | 208 | private function getTreeSize($fighterCount, $groupSize) |
| 209 | 209 | { |
| 210 | 210 | $square = collect([1, 2, 4, 8, 16, 32, 64]); |
| 211 | - $squareMultiplied = $square->map(function ($item, $key) use ($groupSize) { |
|
| 211 | + $squareMultiplied = $square->map(function($item, $key) use ($groupSize) { |
|
| 212 | 212 | return $item * $groupSize; |
| 213 | 213 | }); |
| 214 | 214 | |
@@ -31,7 +31,7 @@ |
||
| 31 | 31 | |
| 32 | 32 | public function rounds() |
| 33 | 33 | { |
| 34 | - return $this->belongsToMany(Round::class,'round_team'); |
|
| 34 | + return $this->belongsToMany(Round::class, 'round_team'); |
|
| 35 | 35 | } |
| 36 | 36 | |
| 37 | 37 | } |
| 38 | 38 | \ No newline at end of file |
@@ -76,7 +76,7 @@ |
||
| 76 | 76 | |
| 77 | 77 | public function rounds() |
| 78 | 78 | { |
| 79 | - return $this->belongsToMany(Round::class,'round_competitor'); |
|
| 79 | + return $this->belongsToMany(Round::class, 'round_competitor'); |
|
| 80 | 80 | } |
| 81 | 81 | |
| 82 | 82 | } |
@@ -160,7 +160,7 @@ |
||
| 160 | 160 | |
| 161 | 161 | $fighters = self::getActorsToFights($championship, $round2); |
| 162 | 162 | |
| 163 | - $away = $fighters->splice(sizeof($fighters) / 2); // 2 |
|
| 163 | + $away = $fighters->splice(sizeof($fighters) / 2); // 2 |
|
| 164 | 164 | |
| 165 | 165 | $home = $fighters; // 1 |
| 166 | 166 | |
@@ -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); |
@@ -47,7 +47,7 @@ |
||
| 47 | 47 | 'championshipSettings' |
| 48 | 48 | )->first(); |
| 49 | 49 | |
| 50 | - $championship = Championship::with('teams','users','category','settings')->find($championship->id); |
|
| 50 | + $championship = Championship::with('teams', 'users', 'category', 'settings')->find($championship->id); |
|
| 51 | 51 | |
| 52 | 52 | $settings = ChampionshipSettings::createOrUpdate($request, $championship); |
| 53 | 53 | |