Passed
Push — master ( 14ed1b...ecb8e9 )
by Julien
31:40
created
database/factories/CompetitorFactory.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\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
     $championshipId = $faker->randomElement($tcs);
Please login to merge, or discard this patch.
src/TreeController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@
 block discarded – undo
51 51
         DB::table('fighters_group_competitor')->delete();
52 52
         DB::table('fighters_group_team')->delete();
53 53
         DB::table('competitor')->delete();
54
-        DB::table('users')->where('id','<>',1)->delete();
54
+        DB::table('users')->where('id', '<>', 1)->delete();
55 55
 
56 56
         $championship = Championship::with('teams', 'users', 'category', 'settings')->find($championship->id);
57 57
         $numFighters = $request->numFighters;
Please login to merge, or discard this patch.
src/models/FightersGroup.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -206,7 +206,7 @@
 block discarded – undo
206 206
             foreach ($fightsByRound as $numFight => $fight) {
207 207
 
208 208
                 $parentGroup = $fight->group->parent;
209
-                if ($parentGroup == null ) break;
209
+                if ($parentGroup == null) break;
210 210
                 $parentFight = $parentGroup->fights->get(0);
211 211
 
212 212
                 // IN this $fight, if it is the first child or the second child --> c1 or c2 in parent
Please login to merge, or discard this patch.
src/models/Championship.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -24,11 +24,11 @@  discard block
 block discarded – undo
24 24
     {
25 25
         parent::boot();
26 26
 
27
-        static::deleting(function ($championship) {
27
+        static::deleting(function($championship) {
28 28
             $championship->competitors()->delete();
29 29
             $championship->settings()->delete();
30 30
         });
31
-        static::restoring(function ($championship) {
31
+        static::restoring(function($championship) {
32 32
             $championship->competitors()->restore();
33 33
             $championship->settings()->restore();
34 34
         });
@@ -213,7 +213,7 @@  discard block
 block discarded – undo
213 213
      */
214 214
     public function groupsByRound($round)
215 215
     {
216
-        return $this->fightersGroups()->where('round',$round);
216
+        return $this->fightersGroups()->where('round', $round);
217 217
     }
218 218
 
219 219
     /**
@@ -223,6 +223,6 @@  discard block
 block discarded – undo
223 223
      */
224 224
     public function fightsByRound($round)
225 225
     {
226
-        return $this->hasManyThrough(Fight::class, FightersGroup::class)->where('round',$round);
226
+        return $this->hasManyThrough(Fight::class, FightersGroup::class)->where('round', $round);
227 227
     }
228 228
 }
Please login to merge, or discard this patch.
src/TreeGen/DirectEliminationTreeGen.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@
 block discarded – undo
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);
Please login to merge, or discard this patch.
src/TreeGen/TreeGen.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
     private function getTreeSize($fighterCount, $groupSize)
131 131
     {
132 132
         $square = collect([1, 2, 4, 8, 16, 32, 64]);
133
-        $squareMultiplied = $square->map(function ($item, $key) use ($groupSize) {
133
+        $squareMultiplied = $square->map(function($item, $key) use ($groupSize) {
134 134
             return $item * $groupSize;
135 135
         });
136 136
 
@@ -352,7 +352,7 @@  discard block
 block discarded – undo
352 352
     private function getPreviousRound($currentRound)
353 353
     {
354 354
         $previousRound = $this->championship->groupsByRound($currentRound + 1)->get();
355
-        dump("previous". $previousRound->pluck('id'));
355
+        dump("previous" . $previousRound->pluck('id'));
356 356
         return $previousRound;
357 357
     }
358 358
 
Please login to merge, or discard this patch.