Completed
Push — master ( ce343e...8c2661 )
by Sam
12:36
created
app/Http/Controllers/ApiTokenController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,6 +21,6 @@
 block discarded – undo
21 21
             'api_token' => hash('sha256', $token),
22 22
         ])->save();
23 23
 
24
-        return ['token' => $token];
24
+        return [ 'token' => $token ];
25 25
     }
26 26
 }
Please login to merge, or discard this patch.
app/Http/Controllers/Api/AssociationsController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@
 block discarded – undo
33 33
     public function index(Request $request) {
34 34
         $user = $request->user();
35 35
 
36
-        $userAssociations = Association::all()->filter(function ($association) {
36
+        $userAssociations = Association::all()->filter(function($association) {
37 37
             return Bouncer::can('manage', $association);
38 38
         });
39 39
 
Please login to merge, or discard this patch.
app/Http/Controllers/AssociationsController.php 1 patch
Spacing   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
     }
26 26
 
27 27
     public function view(Association $association) {
28
-        return view('association.view', ['association' => $association]);
28
+        return view('association.view', [ 'association' => $association ]);
29 29
     }
30 30
 
31 31
     public function edit(Association $association) {
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
 
46 46
     public function home() {
47 47
         if (!empty($this->association)) {
48
-            return view('association.home', ['association' => $this->association]);
48
+            return view('association.home', [ 'association' => $this->association ]);
49 49
         }
50 50
         else {
51 51
             abort(404);
@@ -53,35 +53,35 @@  discard block
 block discarded – undo
53 53
     }
54 54
 
55 55
     public function divisions(Association $association) {
56
-        return view('association.divisions', ['association' => $association]);
56
+        return view('association.divisions', [ 'association' => $association ]);
57 57
     }
58 58
 
59 59
     public function teams(Association $association) {
60
-        return view('association.teams', ['association' => $association]);
60
+        return view('association.teams', [ 'association' => $association ]);
61 61
     }
62 62
 
63 63
     public function venues(Association $association) {
64
-        return view('association.venues', ['association' => $association]);
64
+        return view('association.venues', [ 'association' => $association ]);
65 65
     }
66 66
 
67 67
     public function series(Association $association) {
68
-        return view('association.series', ['association' => $association]);
68
+        return view('association.series', [ 'association' => $association ]);
69 69
     }
70 70
 
71 71
     public function users(Association $association) {
72
-        return view('association.users', ['association' => $association]);
72
+        return view('association.users', [ 'association' => $association ]);
73 73
     }
74 74
 
75 75
     public function viewUser(Association $association, User $user) {
76
-        return view('association.user.view', ['association' => $association, 'user' => $user]);
76
+        return view('association.user.view', [ 'association' => $association, 'user' => $user ]);
77 77
     }
78 78
 
79 79
     public function editUser(Association $association, User $user) {
80
-        return view('association.user.edit', ['association' => $association, 'user' => $user]);
80
+        return view('association.user.edit', [ 'association' => $association, 'user' => $user ]);
81 81
     }
82 82
 
83 83
     public function userToken(Association $association, User $user) {
84
-        return view('association.user.token', ['association' => $association, 'user' => $user]);
84
+        return view('association.user.token', [ 'association' => $association, 'user' => $user ]);
85 85
     }
86 86
 
87 87
     public function userTokenRefresh(Association $association, User $user) {
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
             'api_token' => hash('sha256', $token),
92 92
         ])->save();
93 93
 
94
-        return view('association.user.token-refresh', ['association' => $association, 'user' => $user, 'token' => $token]);
94
+        return view('association.user.token-refresh', [ 'association' => $association, 'user' => $user, 'token' => $token ]);
95 95
     }
96 96
 
97 97
     public function updateUser(Request $request, Association $association, User $user) {
@@ -111,12 +111,12 @@  discard block
 block discarded – undo
111 111
             return redirect($url)->with('success', 'Data saved successfully!');
112 112
         }
113 113
 
114
-        return redirect()->route('user', ['id' => \Auth::user()->id]);
114
+        return redirect()->route('user', [ 'id' => \Auth::user()->id ]);
115 115
 
116 116
     }
117 117
 
118 118
     public function addUser(Association $association) {
119
-        return view('association.user.add', ['association' => $association]);
119
+        return view('association.user.add', [ 'association' => $association ]);
120 120
     }
121 121
 
122 122
     public function submitScoreBegin(Request $request) {
@@ -128,13 +128,13 @@  discard block
 block discarded – undo
128 128
 
129 129
             // get rounds with start_date < today, but greater than today - 1 week
130 130
             $rounds = Round::whereIn('schedule_id', $schedules->pluck('id'))
131
-                ->where('start_date','>=', date('Y-m-d', strtotime('-1 week')))
131
+                ->where('start_date', '>=', date('Y-m-d', strtotime('-1 week')))
132 132
                 ->where('start_date', '<=', date('Y-m-d', strtotime("today")))->get();
133 133
 
134 134
             $divisions = Division::whereIn('id', $rounds->pluck('division_id'))->get();
135 135
 
136 136
             if (count($divisions) === 1) {
137
-                $request->division_id = $divisions[0]->id;
137
+                $request->division_id = $divisions[ 0 ]->id;
138 138
 
139 139
                 return $this->submitScoreStep2($request);
140 140
             }
@@ -164,7 +164,7 @@  discard block
 block discarded – undo
164 164
             $rounds = Round::whereIn('schedule_id', $schedules->pluck('id'))
165 165
                 ->where('start_date', '>=', date('Y-m-d', strtotime('-1 week')))
166 166
                 ->where('start_date', '<=', date('Y-m-d', strtotime("today")))
167
-                ->where(function ($query) {
167
+                ->where(function($query) {
168 168
                     $query->where('scores_closed', 0);
169 169
                     $query->orWhereNull('scores_closed');
170 170
                 })
@@ -263,11 +263,11 @@  discard block
 block discarded – undo
263 263
     }
264 264
 
265 265
     public function standings() {
266
-        return view('association.standings', ['association' => $this->association]);
266
+        return view('association.standings', [ 'association' => $this->association ]);
267 267
     }
268 268
 
269 269
     public function schedule() {
270
-        return view('association.schedule', ['association' => $this->association]);
270
+        return view('association.schedule', [ 'association' => $this->association ]);
271 271
     }
272 272
 
273 273
     public function css() {
@@ -292,7 +292,7 @@  discard block
 block discarded – undo
292 292
             $association->save();
293 293
 
294 294
             // TODO: Do not necessarily "onboard" for certain roles?
295
-            return redirect()->route('onboard.association', ['association' => $association]);
295
+            return redirect()->route('onboard.association', [ 'association' => $association ]);
296 296
         }
297 297
         else {
298 298
             return view('denied');
@@ -328,13 +328,13 @@  discard block
 block discarded – undo
328 328
             return redirect($url)->with('success', 'Data saved successfully!');
329 329
         }
330 330
 
331
-        return redirect()->route('user', ['id' => \Auth::user()->id]);
331
+        return redirect()->route('user', [ 'id' => \Auth::user()->id ]);
332 332
 
333 333
     }
334 334
 
335 335
     public function create() {
336 336
         if (Bouncer::can('create', Association::class)) {
337
-            return view('association.create', ['current_user' => \Auth::user()]);
337
+            return view('association.create', [ 'current_user' => \Auth::user() ]);
338 338
         }
339 339
         else {
340 340
             return view('denied');
@@ -342,7 +342,7 @@  discard block
 block discarded – undo
342 342
     }
343 343
 
344 344
     public function deleteConfirm(Association $association) {
345
-        return view('association.delete', ['association' => $association]);
345
+        return view('association.delete', [ 'association' => $association ]);
346 346
     }
347 347
 
348 348
     public function delete(Association $association) {
@@ -352,13 +352,13 @@  discard block
 block discarded – undo
352 352
     }
353 353
 
354 354
     public function undeleteConfirm(Association $association) {
355
-        return view('association.undelete', ['association' => $association]);
355
+        return view('association.undelete', [ 'association' => $association ]);
356 356
     }
357 357
 
358 358
     public function undelete(Association $association) {
359 359
         $association->restore();
360 360
 
361
-        return redirect()->route('user', ['user' => \Auth::user()])->with('success', 'Association restored successfully.');
361
+        return redirect()->route('user', [ 'user' => \Auth::user() ])->with('success', 'Association restored successfully.');
362 362
     }
363 363
 
364 364
 
Please login to merge, or discard this patch.