@@ -99,8 +99,9 @@ |
||
99 | 99 | if ($user->isFederationPresident() && |
100 | 100 | $user->federationOwned != null && |
101 | 101 | $this->federation->id == $user->federationOwned->id |
102 | - ) |
|
103 | - return true; |
|
102 | + ) { |
|
103 | + return true; |
|
104 | + } |
|
104 | 105 | return false; |
105 | 106 | } |
106 | 107 |
@@ -122,8 +122,9 @@ |
||
122 | 122 | break; |
123 | 123 | } |
124 | 124 | |
125 | - if ($exception instanceof MaintenanceModeException) |
|
126 | - return response()->view('errors.503'); |
|
125 | + if ($exception instanceof MaintenanceModeException) { |
|
126 | + return response()->view('errors.503'); |
|
127 | + } |
|
127 | 128 | |
128 | 129 | |
129 | 130 | return response()->view('errors.general', |
@@ -32,8 +32,9 @@ |
||
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) |
@@ -38,9 +38,15 @@ |
||
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(); |
@@ -136,8 +136,9 @@ |
||
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)); |
@@ -144,8 +144,9 @@ |
||
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()); |
@@ -88,9 +88,15 @@ discard block |
||
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 |
||
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]); |
@@ -62,8 +62,9 @@ discard block |
||
62 | 62 | public function store(AssociationRequest $request) |
63 | 63 | { |
64 | 64 | try { |
65 | - if ($request->president_id == 0) |
|
66 | - $request->merge(['president_id' => null]); |
|
65 | + if ($request->president_id == 0) { |
|
66 | + $request->merge(['president_id' => null]); |
|
67 | + } |
|
67 | 68 | |
68 | 69 | $association = Association::create($request->all()); |
69 | 70 | if (Request::ajax()) { |
@@ -137,8 +138,9 @@ discard block |
||
137 | 138 | throw new AuthorizationException(); |
138 | 139 | } |
139 | 140 | try { |
140 | - if ($request->president_id == 0) |
|
141 | - $request->merge(['president_id' => null]); |
|
141 | + if ($request->president_id == 0) { |
|
142 | + $request->merge(['president_id' => null]); |
|
143 | + } |
|
142 | 144 | |
143 | 145 | $association->update($request->all()); |
144 | 146 | $msg = trans('msg.association_edit_successful', ['name' => $association->name]); |
@@ -67,8 +67,9 @@ |
||
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 | } |