@@ -36,8 +36,7 @@ discard block |
||
36 | 36 | 'venues' => Venue::orderBy('name', 'ASC')->where('association_id', $association->id)->get(), |
37 | 37 | 'current_user' => \Auth::user() |
38 | 38 | ]); |
39 | - } |
|
40 | - else { |
|
39 | + } else { |
|
41 | 40 | return view('denied'); |
42 | 41 | } |
43 | 42 | } |
@@ -45,8 +44,7 @@ discard block |
||
45 | 44 | public function home() { |
46 | 45 | if (!empty($this->association)) { |
47 | 46 | return view('association.home', ['association' => $this->association]); |
48 | - } |
|
49 | - else { |
|
47 | + } else { |
|
50 | 48 | abort(404); |
51 | 49 | } |
52 | 50 | } |
@@ -80,8 +78,7 @@ discard block |
||
80 | 78 | if (isset($request->assoc_admin)) { |
81 | 79 | Bouncer::assign('assocadmin')->to($user); |
82 | 80 | Bouncer::allow($user)->toManage($association); |
83 | - } |
|
84 | - else { |
|
81 | + } else { |
|
85 | 82 | Bouncer::disallow($user)->toManage($association); |
86 | 83 | Bouncer::retract('assocadmin')->from($user); |
87 | 84 | } |
@@ -118,15 +115,13 @@ discard block |
||
118 | 115 | $request->division_id = $divisions[0]->id; |
119 | 116 | |
120 | 117 | return $this->submitScoreStep2($request); |
121 | - } |
|
122 | - else { |
|
118 | + } else { |
|
123 | 119 | return view('forms.results.choose-division', [ |
124 | 120 | 'association' => $this->association, |
125 | 121 | 'divisions' => $divisions, |
126 | 122 | ]); |
127 | 123 | } |
128 | - } |
|
129 | - else { |
|
124 | + } else { |
|
130 | 125 | abort(404); |
131 | 126 | } |
132 | 127 | } |
@@ -156,8 +151,7 @@ discard block |
||
156 | 151 | 'association' => $this->association, |
157 | 152 | 'rounds' => $rounds, |
158 | 153 | ]); |
159 | - } |
|
160 | - else { |
|
154 | + } else { |
|
161 | 155 | abort(404); |
162 | 156 | } |
163 | 157 | } |
@@ -170,8 +164,7 @@ discard block |
||
170 | 164 | 'association' => $this->association, |
171 | 165 | 'match' => $match, |
172 | 166 | ]); |
173 | - } |
|
174 | - else { |
|
167 | + } else { |
|
175 | 168 | abort(404); |
176 | 169 | } |
177 | 170 | } |
@@ -201,20 +194,17 @@ discard block |
||
201 | 194 | return view('forms.results.thanks', [ |
202 | 195 | 'association' => $this->association, |
203 | 196 | ]); |
204 | - } |
|
205 | - else { |
|
197 | + } else { |
|
206 | 198 | return view('forms.results.choose-winner', [ |
207 | 199 | 'association' => $this->association, |
208 | 200 | 'match' => Match::find($submission->match_id), |
209 | 201 | 'submission' => $submission, |
210 | 202 | ]); |
211 | 203 | } |
212 | - } |
|
213 | - else { |
|
204 | + } else { |
|
214 | 205 | abort(404); |
215 | 206 | } |
216 | - } |
|
217 | - else { |
|
207 | + } else { |
|
218 | 208 | abort(404); |
219 | 209 | } |
220 | 210 | } |
@@ -233,12 +223,10 @@ discard block |
||
233 | 223 | return view('forms.results.thanks', [ |
234 | 224 | 'association' => $this->association, |
235 | 225 | ]); |
236 | - } |
|
237 | - else { |
|
226 | + } else { |
|
238 | 227 | abort(404); |
239 | 228 | } |
240 | - } |
|
241 | - else { |
|
229 | + } else { |
|
242 | 230 | abort(404); |
243 | 231 | } |
244 | 232 | } |
@@ -274,8 +262,7 @@ discard block |
||
274 | 262 | |
275 | 263 | // TODO: Do not necessarily "onboard" for certain roles? |
276 | 264 | return redirect()->route('onboard.association', ['association' => $association]); |
277 | - } |
|
278 | - else { |
|
265 | + } else { |
|
279 | 266 | return view('denied'); |
280 | 267 | } |
281 | 268 | } |
@@ -316,8 +303,7 @@ discard block |
||
316 | 303 | public function create() { |
317 | 304 | if (Bouncer::can('create', Association::class)) { |
318 | 305 | return view('association.create', ['current_user' => \Auth::user()]); |
319 | - } |
|
320 | - else { |
|
306 | + } else { |
|
321 | 307 | return view('denied'); |
322 | 308 | } |
323 | 309 | } |