Completed
Push — master ( 332511...198978 )
by Julien
02:42
created
src/TreeGen/DirectEliminationTreeGen.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -68,9 +68,9 @@
 block discarded – undo
68 68
      */
69 69
     public function generateNextRoundsFights()
70 70
     {
71
-        if ($this->championship->category->isTeam){
71
+        if ($this->championship->category->isTeam) {
72 72
             $championship = $this->championship->withCount('teams', 'competitors')->find(2);
73
-        }else{
73
+        } else {
74 74
             $championship = $this->championship->withCount('teams', 'competitors')->first();
75 75
         }
76 76
 
Please login to merge, or discard this patch.
src/TreeGen/CreateDirectEliminationTree.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
         $this->championship = $championship;
25 25
         $this->names = $names;
26 26
 
27
-        $this->firstRoundName = $names->first()->map(function ($item) use ($championship) {
27
+        $this->firstRoundName = $names->first()->map(function($item) use ($championship) {
28 28
             $fighters = $item->getFighters();
29 29
             $fighter1 = $fighters->get(0);
30 30
             $fighter2 = $fighters->get(1);
@@ -240,7 +240,7 @@  discard block
 block discarded – undo
240 240
         for ($roundNumber = 1; $roundNumber <= $this->noRounds; $roundNumber++) {
241 241
             $groupsByRound = $this->names->get($roundNumber);
242 242
             for ($matchNumber = 1; $matchNumber <= ($this->noTeams / pow(2, $roundNumber)); $matchNumber++) {
243
-                $fight = $groupsByRound[$matchNumber-1]->fights[0];
243
+                $fight = $groupsByRound[$matchNumber - 1]->fights[0];
244 244
 
245 245
                 if ($this->championship->category->isTeam()) {
246 246
                     $fighter1 = $fight->team1;
Please login to merge, or discard this patch.
src/models/ChampionshipSettings.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@
 block discarded – undo
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();
Please login to merge, or discard this patch.
database/factories/TeamFactory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@
 block discarded – undo
4 4
 use Xoco70\KendoTournaments\Models\Championship;
5 5
 use Xoco70\KendoTournaments\Models\Team;
6 6
 
7
-$factory->define(Team::class, function (Faker\Generator $faker) {
7
+$factory->define(Team::class, function(Faker\Generator $faker) {
8 8
     return [
9 9
         'name' => $faker->name,
10 10
         'championship_id' => Championship::find(2),
Please login to merge, or discard this patch.
resources/views/tree/index.blade.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@
 block discarded – undo
21 21
 $fightingAreas = $setting->fightingAreas;
22 22
 $fights = $championship->fights;
23 23
 $numFighters = $numFighters ??  5;
24
-$isTeam = $isTeam ??  0;;
24
+$isTeam = $isTeam ??  0; ;
25 25
 ?>
26 26
 @include('kendo-tournaments::partials.errors')
27 27
 
Please login to merge, or discard this patch.