Test Setup Failed
Push — master ( f46e6c...b515a7 )
by Sam
05:53
created
app/Http/Controllers/AssociationsController.php 1 patch
Braces   +14 added lines, -28 removed lines patch added patch discarded remove patch
@@ -39,8 +39,7 @@  discard block
 block discarded – undo
39 39
                 'venues' => Venue::orderBy('name', 'ASC')->where('association_id', $association->id)->get(),
40 40
                 'current_user' => \Auth::user()
41 41
             ]);
42
-        }
43
-        else {
42
+        } else {
44 43
             return view('denied');
45 44
         }
46 45
     }
@@ -48,8 +47,7 @@  discard block
 block discarded – undo
48 47
     public function home() {
49 48
         if (!empty($this->association)) {
50 49
             return view('association.home', ['association' => $this->association]);
51
-        }
52
-        else {
50
+        } else {
53 51
             abort(404);
54 52
         }
55 53
     }
@@ -101,8 +99,7 @@  discard block
 block discarded – undo
101 99
         if (isset($request->assoc_admin)) {
102 100
             Bouncer::assign('assocadmin')->to($user);
103 101
             Bouncer::allow($user)->toManage($association);
104
-        }
105
-        else {
102
+        } else {
106 103
             Bouncer::disallow($user)->toManage($association);
107 104
             Bouncer::retract('assocadmin')->from($user);
108 105
         }
@@ -139,15 +136,13 @@  discard block
 block discarded – undo
139 136
                 $request->division_id = $divisions[0]->id;
140 137
 
141 138
                 return $this->submitScoreStep2($request);
142
-            }
143
-            else {
139
+            } else {
144 140
                 return view('forms.results.choose-division', [
145 141
                     'association' => $this->association,
146 142
                     'divisions' => $divisions,
147 143
                     ]);
148 144
             }
149
-        }
150
-        else {
145
+        } else {
151 146
             abort(404);
152 147
         }
153 148
     }
@@ -177,8 +172,7 @@  discard block
 block discarded – undo
177 172
                 'association' => $this->association,
178 173
                 'rounds' => $rounds,
179 174
                 ]);
180
-        }
181
-        else {
175
+        } else {
182 176
             abort(404);
183 177
         }
184 178
     }
@@ -191,8 +185,7 @@  discard block
 block discarded – undo
191 185
                 'association' => $this->association,
192 186
                 'match' => $match,
193 187
                 ]);
194
-        }
195
-        else {
188
+        } else {
196 189
             abort(404);
197 190
         }
198 191
     }
@@ -222,20 +215,17 @@  discard block
 block discarded – undo
222 215
                     return view('forms.results.thanks', [
223 216
                         'association' => $this->association,
224 217
                         ]);
225
-                }
226
-                else {
218
+                } else {
227 219
                     return view('forms.results.choose-winner', [
228 220
                         'association' => $this->association,
229 221
                         'match' => PLMatch::find($submission->match_id),
230 222
                         'submission' => $submission,
231 223
                         ]);
232 224
                 }
233
-            }
234
-            else {
225
+            } else {
235 226
                 abort(404);
236 227
             }
237
-        }
238
-        else {
228
+        } else {
239 229
             abort(404);
240 230
         }
241 231
     }
@@ -254,12 +244,10 @@  discard block
 block discarded – undo
254 244
                 return view('forms.results.thanks', [
255 245
                     'association' => $this->association,
256 246
                     ]);
257
-            }
258
-            else {
247
+            } else {
259 248
                 abort(404);
260 249
             }
261
-        }
262
-        else {
250
+        } else {
263 251
             abort(404);
264 252
         }
265 253
     }
@@ -295,8 +283,7 @@  discard block
 block discarded – undo
295 283
 
296 284
             // TODO: Do not necessarily "onboard" for certain roles?
297 285
             return redirect()->route('onboard.association', ['association' => $association]);
298
-        }
299
-        else {
286
+        } else {
300 287
             return view('denied');
301 288
         }
302 289
     }
@@ -347,8 +334,7 @@  discard block
 block discarded – undo
347 334
     public function create() {
348 335
         if (Bouncer::can('create', Association::class)) {
349 336
             return view('association.create', ['current_user' => \Auth::user()]);
350
-        }
351
-        else {
337
+        } else {
352 338
             return view('denied');
353 339
         }
354 340
     }
Please login to merge, or discard this patch.