Completed
Push — master ( e2688c...85c35c )
by Julien
09:39 queued 03:59
created
app/Http/Controllers/UserController.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
     public function export()
152 152
     {
153 153
 
154
-        Excel::create(trans_choice('core.user', 2), function ($excel) {
154
+        Excel::create(trans_choice('core.user', 2), function($excel) {
155 155
             $appName = (app()->environment() == 'local' ? getenv('APP_NAME') : config('app.name'));
156 156
 
157 157
             // Set the title
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
 
164 164
             // Call them separately
165 165
             $excel->setDescription('A list of users');
166
-            $excel->sheet(trans_choice('core.user', 2), function ($sheet) {
166
+            $excel->sheet(trans_choice('core.user', 2), function($sheet) {
167 167
                 //TODO Here we should join grade, role, country to print name not FK
168 168
                 $users = User::all();
169 169
 //                $users = User::with(['grade', 'role'])->get();
@@ -178,7 +178,7 @@  discard block
 block discarded – undo
178 178
     {
179 179
         $tournaments = Auth::user()->myTournaments()->with('owner')
180 180
             ->orderBy('created_at', 'desc')
181
-            ->paginate(config('constants.PAGINATION'));;
181
+            ->paginate(config('constants.PAGINATION')); ;
182 182
 
183 183
         $title = trans('core.tournaments_registered');
184 184
 
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/Http/Controllers/InviteController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -98,7 +98,7 @@
 block discarded – undo
98 98
         $tournament = Tournament::where('slug', $request->tournamentSlug)->first();
99 99
         // Parse Csv File
100 100
 
101
-        $reader = Excel::load("storage/app/" . $file, function ($reader) {
101
+        $reader = Excel::load("storage/app/" . $file, function($reader) {
102 102
         })->get();
103 103
 
104 104
         // Checking if malformed email
Please login to merge, or discard this patch.
app/Invite.php 1 patch
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.
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 1 patch
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.
app/Club.php 1 patch
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.