Completed
Push — master ( 8efd5e...9e77ef )
by Julien
39:33
created
app/Http/Requests/ChampionshipRequest.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -32,8 +32,9 @@
 block discarded – undo
32 32
 
33 33
     public function getInvite(Tournament $tournament)
34 34
     {
35
-        if ($this->invite != 0)
36
-            return Invite::findOrFail($this->invite);
35
+        if ($this->invite != 0) {
36
+                    return Invite::findOrFail($this->invite);
37
+        }
37 38
 
38 39
         return Invite::where('code', 'open')
39 40
             ->where('email', Auth::user()->email)
Please login to merge, or discard this patch.
app/Http/Controllers/FightController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@
 block discarded – undo
16 16
     public function index(Request $request)
17 17
     {
18 18
         $grades = Grade::getAllPlucked();
19
-        $tournament = Tournament::with(['championships.firstRoundFights' => function ($query) {
19
+        $tournament = Tournament::with(['championships.firstRoundFights' => function($query) {
20 20
             $query->with(['competitor1.user', 'competitor2.user', 'team1', 'team2']);
21 21
         }])->where('slug', $request->tournament)
22 22
             ->first();
Please login to merge, or discard this patch.
app/Http/Controllers/UserAvatarController.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
             ->store(config('constants.RELATIVE_AVATAR_PATH'), 'public');
22 22
 
23 23
         Image::make(storage_path('app/public/' . $file))
24
-            ->resize(200, 200, function ($constraint) {
24
+            ->resize(200, 200, function($constraint) {
25 25
                 $constraint->aspectRatio();
26 26
                 $constraint->upsize();
27 27
             })
Please login to merge, or discard this patch.
app/Http/Controllers/DashboardController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@
 block discarded – undo
26 26
     public function index()
27 27
     {
28 28
         $openTournaments = Tournament::with('owner')
29
-            ->whereHas('owner', function ($query) {
29
+            ->whereHas('owner', function($query) {
30 30
                 $query->where('country_id', Auth::user()->country_id);
31 31
             })
32 32
             ->where('type', config('constants.OPEN_TOURNAMENT'))
Please login to merge, or discard this patch.
app/Invite.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -37,9 +37,9 @@  discard block
 block discarded – undo
37 37
 
38 38
     public static function sendInvites($reader, $tournament)
39 39
     {
40
-        $reader->each(function ($sheet) use ($tournament) {
40
+        $reader->each(function($sheet) use ($tournament) {
41 41
             // Loop through all rows of spreadsheet
42
-            $sheet->each(function ($row) use ($tournament) {
42
+            $sheet->each(function($row) use ($tournament) {
43 43
                 // Check email
44 44
                 $invite = new Invite();
45 45
                 $code = $invite->generateTournamentInvite($row, $tournament);
@@ -118,9 +118,9 @@  discard block
 block discarded – undo
118 118
      */
119 119
     public function checkBadEmailsInExcel($reader, $tournament)
120 120
     {
121
-        $reader->each(function ($sheet) use ($tournament) {
121
+        $reader->each(function($sheet) use ($tournament) {
122 122
             // Loop through all rows
123
-            $sheet->each(function ($row) use ($tournament) {
123
+            $sheet->each(function($row) use ($tournament) {
124 124
                 // Check email
125 125
                 if (!filter_var($row, FILTER_VALIDATE_EMAIL)) {
126 126
                     $this->emailBadFormat = true;
Please login to merge, or discard this patch.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -67,8 +67,9 @@
 block discarded – undo
67 67
         $invite->expiration = $tournament->registerDateLimit;
68 68
         $invite->active = true;
69 69
 
70
-        if ($invite->save())
71
-            return $token;
70
+        if ($invite->save()) {
71
+                    return $token;
72
+        }
72 73
 
73 74
         return null;
74 75
     }
Please login to merge, or discard this patch.
app/User.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
     public static function boot()
70 70
     {
71 71
         parent::boot();
72
-        static::creating(function ($user) {
72
+        static::creating(function($user) {
73 73
             $softDeletedUser = User::onlyTrashed()->where('email', '=', $user->email)->first();
74 74
             if ($softDeletedUser != null) {
75 75
                 $softDeletedUser->restore();
@@ -85,12 +85,12 @@  discard block
 block discarded – undo
85 85
         // If a User is deleted, you must delete:
86 86
         // His tournaments, his competitors
87 87
 
88
-        static::deleting(function ($user) {
88
+        static::deleting(function($user) {
89 89
             $user->tournaments->each->delete();
90 90
             $user->competitors->each->delete();
91 91
 
92 92
         });
93
-        static::restoring(function ($user) {
93
+        static::restoring(function($user) {
94 94
             $user->competitors()->withTrashed()->get()->each->restore();
95 95
             $user->tournaments()->withTrashed()->get()->each->restore();
96 96
         });
Please login to merge, or discard this patch.
app/Tournament.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -51,12 +51,12 @@  discard block
 block discarded – undo
51 51
     protected static function boot()
52 52
     {
53 53
         parent::boot();
54
-        static::deleting(function ($tournament) {
54
+        static::deleting(function($tournament) {
55 55
             $tournament->championships->each->delete();
56 56
             $tournament->invites->each->delete();
57 57
 
58 58
         });
59
-        static::restoring(function ($tournament) {
59
+        static::restoring(function($tournament) {
60 60
             $tournament->championships()->withTrashed()->get()->each->restore();
61 61
         });
62 62
 
@@ -361,7 +361,7 @@  discard block
 block discarded – undo
361 361
     public function buildCategoryList()
362 362
     {
363 363
         $championships = Championship::with('category', 'settings')
364
-            ->whereHas('category', function ($query) {
364
+            ->whereHas('category', function($query) {
365 365
                 return $query->where('isTeam', 1);
366 366
             })
367 367
             ->where('tournament_id', $this->id)
Please login to merge, or discard this patch.
Braces   +4 added lines, -1 removed lines patch added patch discarded remove patch
@@ -300,7 +300,10 @@
 block discarded – undo
300 300
      */
301 301
     public function setAndConfigureCategories($ruleId)
302 302
     {
303
-        if ($ruleId == 0) return; // No Rules Selected
303
+        if ($ruleId == 0) {
304
+            return;
305
+        }
306
+        // No Rules Selected
304 307
 
305 308
         $options = $this->loadRulesOptions($ruleId);
306 309
 
Please login to merge, or discard this patch.
app/Club.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -114,7 +114,7 @@
 block discarded – undo
114 114
                 return $query->where('federation_id', $user->federationOwned->id);
115 115
             case
116 116
                 $user->isAssociationPresident() && $user->associationOwned:
117
-                return $query->whereHas('association', function ($query) use ($user) {
117
+                return $query->whereHas('association', function($query) use ($user) {
118 118
                     $query->where('id', $user->associationOwned->id);
119 119
                 });
120 120
             case $user->isClubPresident() && $user->clubOwned:
Please login to merge, or discard this patch.
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -82,10 +82,12 @@
 block discarded – undo
82 82
      */
83 83
     public function federation()
84 84
     {
85
-        if ($this->association != null)
86
-            return $this->association->federation();
87
-        else
88
-            return $this->association(); //TODO THIS IS BAD :(
85
+        if ($this->association != null) {
86
+                    return $this->association->federation();
87
+        } else {
88
+                    return $this->association();
89
+        }
90
+        //TODO THIS IS BAD :(
89 91
     }
90 92
 
91 93
     /**
Please login to merge, or discard this patch.
app/Notifications/AccountRegistered.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@
 block discarded – undo
27 27
      * Get the notification's delivery channels.
28 28
      *
29 29
      * @param  mixed $notifiable
30
-     * @return array
30
+     * @return string[]
31 31
      */
32 32
     public function via($notifiable)
33 33
     {
Please login to merge, or discard this patch.