Completed
Push — master ( dd3542...a420e1 )
by Julien
09:51
created
app/Team.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@
 block discarded – undo
7 7
     protected static function boot()
8 8
     {
9 9
         parent::boot();
10
-        static::deleting(function ($team) {
10
+        static::deleting(function($team) {
11 11
             $teams = Team::where('championship_id', $team->championship_id)
12 12
                 ->where('id', '>', $team->id)->get();
13 13
             foreach ($teams as $team) {
Please login to merge, or discard this patch.
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/ChampionshipController.php 1 patch
Braces   +9 added lines, -3 removed lines patch added patch discarded remove patch
@@ -38,9 +38,15 @@
 block discarded – undo
38 38
         $grades = Grade::getAllPlucked();
39 39
         $invite = Invite::getInviteFromToken($token);
40 40
 
41
-        if (is_null($invite)) throw new InvitationNeededException();
42
-        if ($invite->hasExpired()) throw new InvitationExpiredException();
43
-        if ($invite->active != 1) throw new InvitationNotActiveException();
41
+        if (is_null($invite)) {
42
+            throw new InvitationNeededException();
43
+        }
44
+        if ($invite->hasExpired()) {
45
+            throw new InvitationExpiredException();
46
+        }
47
+        if ($invite->active != 1) {
48
+            throw new InvitationNotActiveException();
49
+        }
44 50
 
45 51
         // Check if user is already registered
46 52
         $user = User::where('email', $invite->email)->first();
Please login to merge, or discard this patch.
app/Http/Controllers/UserController.php 2 patches
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.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -136,8 +136,9 @@
 block discarded – undo
136 136
     {
137 137
         if ($userForm->update($user)) {
138 138
             flash()->success(trans('msg.user_update_successful'));
139
-        } else
140
-            flash()->error(Lang::get('msg.user_update_error'));
139
+        } else {
140
+                    flash()->error(Lang::get('msg.user_update_error'));
141
+        }
141 142
 
142 143
         if ($user->id == Auth::user()->id) {
143 144
             return redirect(URL::action('UserController@edit', Auth::user()->slug));
Please login to merge, or discard this patch.
app/Http/Controllers/TournamentController.php 2 patches
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -144,8 +144,9 @@
 block discarded – undo
144 144
     {
145 145
         //TODO Shouldn't I have a Policy???
146 146
         $venue = $tournament->venue;
147
-        if ($venue == null)
148
-            $venue = new Venue;
147
+        if ($venue == null) {
148
+                    $venue = new Venue;
149
+        }
149 150
 
150 151
         if ($venueRequest->has('venue_name')) {
151 152
             $venue->fill($venueRequest->all());
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -110,8 +110,8 @@
 block discarded – undo
110 110
         $tournament = Tournament::with('competitors', 'championshipSettings', 'championships.settings', 'championships.category')
111 111
             ->withCount('competitors', 'teams')
112 112
             ->find($tournament->id);
113
-        $selectedCategories = $tournament->categories->pluck('name','id'); // 3,4 ,240
114
-        $defaultCategories = Category::take(7)->get()->sortBy('id')->pluck('name','id'); // 1 2 3 4 5 6 7
113
+        $selectedCategories = $tournament->categories->pluck('name', 'id'); // 3,4 ,240
114
+        $defaultCategories = Category::take(7)->get()->sortBy('id')->pluck('name', 'id'); // 1 2 3 4 5 6 7
115 115
 
116 116
         $categories = $selectedCategories->union($defaultCategories)->toArray();
117 117
 
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/ClubController.php 1 patch
Braces   +15 added lines, -5 removed lines patch added patch discarded remove patch
@@ -88,9 +88,15 @@  discard block
 block discarded – undo
88 88
     {
89 89
 
90 90
         try {
91
-            if ($request->president_id == 0) $request->merge(['president_id' => null]);
92
-            if ($request->federation_id == 0) $request->merge(['federation_id' => null]);
93
-            if ($request->association_id == 0) $request->merge(['association_id' => null]);
91
+            if ($request->president_id == 0) {
92
+                $request->merge(['president_id' => null]);
93
+            }
94
+            if ($request->federation_id == 0) {
95
+                $request->merge(['federation_id' => null]);
96
+            }
97
+            if ($request->association_id == 0) {
98
+                $request->merge(['association_id' => null]);
99
+            }
94 100
             $club = Club::create($request->all());
95 101
 
96 102
             if (Request::ajax()) {
@@ -162,8 +168,12 @@  discard block
 block discarded – undo
162 168
         $this->authorize('update', [$club, Auth::user()]);
163 169
 
164 170
         try {
165
-            if ($request->president_id == 0) $request->merge(['president_id' => null]);
166
-            if ($request->association_id == 0) $request->merge(['association_id' => null]);
171
+            if ($request->president_id == 0) {
172
+                $request->merge(['president_id' => null]);
173
+            }
174
+            if ($request->association_id == 0) {
175
+                $request->merge(['association_id' => null]);
176
+            }
167 177
 
168 178
             $club->update($request->all());
169 179
             $msg = trans('msg.club_edit_successful', ['name' => $club->name]);
Please login to merge, or discard this patch.