@@ -53,8 +53,8 @@ discard block |
||
| 53 | 53 | protected function mapWebRoutes() |
| 54 | 54 | { |
| 55 | 55 | Route::middleware('web') |
| 56 | - ->namespace($this->namespace) |
|
| 57 | - ->group(base_path('routes/web.php')); |
|
| 56 | + ->namespace($this->namespace) |
|
| 57 | + ->group(base_path('routes/web.php')); |
|
| 58 | 58 | } |
| 59 | 59 | |
| 60 | 60 | /** |
@@ -67,8 +67,8 @@ discard block |
||
| 67 | 67 | protected function mapApiRoutes() |
| 68 | 68 | { |
| 69 | 69 | Route::prefix('api') |
| 70 | - ->middleware('api') |
|
| 71 | - ->namespace($this->namespace) |
|
| 72 | - ->group(base_path('routes/api.php')); |
|
| 70 | + ->middleware('api') |
|
| 71 | + ->namespace($this->namespace) |
|
| 72 | + ->group(base_path('routes/api.php')); |
|
| 73 | 73 | } |
| 74 | 74 | } |
@@ -35,7 +35,7 @@ |
||
| 35 | 35 | */ |
| 36 | 36 | protected function commands() |
| 37 | 37 | { |
| 38 | - $this->load(__DIR__.'/Commands'); |
|
| 38 | + $this->load(__DIR__ . '/Commands'); |
|
| 39 | 39 | |
| 40 | 40 | require base_path('routes/console.php'); |
| 41 | 41 | } |
@@ -14,7 +14,7 @@ |
||
| 14 | 14 | */ |
| 15 | 15 | protected function redirectTo($request) |
| 16 | 16 | { |
| 17 | - if (! $request->expectsJson()) { |
|
| 17 | + if (!$request->expectsJson()) { |
|
| 18 | 18 | return route('login'); |
| 19 | 19 | } |
| 20 | 20 | } |
@@ -28,8 +28,7 @@ |
||
| 28 | 28 | |
| 29 | 29 | if (Bouncer::can('manage', $association)) { |
| 30 | 30 | return $next($request); |
| 31 | - } |
|
| 32 | - else { |
|
| 31 | + } else { |
|
| 33 | 32 | return redirect()->route('admin'); |
| 34 | 33 | } |
| 35 | 34 | } |
@@ -16,7 +16,7 @@ discard block |
||
| 16 | 16 | */ |
| 17 | 17 | public function index(Association $association) |
| 18 | 18 | { |
| 19 | - return view('result_submissions.approve', ['association' => $association]); |
|
| 19 | + return view('result_submissions.approve', [ 'association' => $association ]); |
|
| 20 | 20 | } |
| 21 | 21 | |
| 22 | 22 | /** |
@@ -101,7 +101,7 @@ discard block |
||
| 101 | 101 | return redirect($url)->with('success', 'Data saved successfully!'); |
| 102 | 102 | } |
| 103 | 103 | |
| 104 | - return redirect()->route('user', ['id' => \Auth::user()->id]); |
|
| 104 | + return redirect()->route('user', [ 'id' => \Auth::user()->id ]); |
|
| 105 | 105 | } |
| 106 | 106 | |
| 107 | 107 | /** |
@@ -75,8 +75,7 @@ |
||
| 75 | 75 | |
| 76 | 76 | if ($request->delete == 'delete') { |
| 77 | 77 | $submission->delete(); |
| 78 | - } |
|
| 79 | - else { |
|
| 78 | + } else { |
|
| 80 | 79 | $result = Result::where('match_id', $submission->match_id)->first(); |
| 81 | 80 | |
| 82 | 81 | if (empty($result)) { |
@@ -34,7 +34,7 @@ |
||
| 34 | 34 | if (Bouncer::can('administer-associations')) { |
| 35 | 35 | $associations = Association::onlyTrashed()->get(); |
| 36 | 36 | |
| 37 | - return view('admin.associations.trashed', ['associations' => $associations]); |
|
| 37 | + return view('admin.associations.trashed', [ 'associations' => $associations ]); |
|
| 38 | 38 | } |
| 39 | 39 | else { |
| 40 | 40 | return view('denied'); |
@@ -13,8 +13,7 @@ discard block |
||
| 13 | 13 | public function admin() { |
| 14 | 14 | if (Bouncer::can('view-admin-pages')) { |
| 15 | 15 | return view('admin'); |
| 16 | - } |
|
| 17 | - else { |
|
| 16 | + } else { |
|
| 18 | 17 | return view('denied'); |
| 19 | 18 | } |
| 20 | 19 | } |
@@ -24,8 +23,7 @@ discard block |
||
| 24 | 23 | return view('admin.users', [ |
| 25 | 24 | 'users' => User::all(), |
| 26 | 25 | ]); |
| 27 | - } |
|
| 28 | - else { |
|
| 26 | + } else { |
|
| 29 | 27 | return view('denied'); |
| 30 | 28 | } |
| 31 | 29 | } |
@@ -35,8 +33,7 @@ discard block |
||
| 35 | 33 | $associations = Association::onlyTrashed()->get(); |
| 36 | 34 | |
| 37 | 35 | return view('admin.associations.trashed', ['associations' => $associations]); |
| 38 | - } |
|
| 39 | - else { |
|
| 36 | + } else { |
|
| 40 | 37 | return view('denied'); |
| 41 | 38 | } |
| 42 | 39 | } |
@@ -75,8 +75,7 @@ discard block |
||
| 75 | 75 | //$start_date_timestamp = strtotime($request->start_date); |
| 76 | 76 | //$series->start_date = $start_date_timestamp; |
| 77 | 77 | $series->start_date = $request->start_date; |
| 78 | - } |
|
| 79 | - else { |
|
| 78 | + } else { |
|
| 80 | 79 | $series->start_date = NULL; |
| 81 | 80 | } |
| 82 | 81 | |
@@ -84,8 +83,7 @@ discard block |
||
| 84 | 83 | //$end_date_timestamp = strtotime($request->end_date); |
| 85 | 84 | //$series->end_date = $end_date_timestamp; |
| 86 | 85 | $series->end_date = $request->end_date; |
| 87 | - } |
|
| 88 | - else { |
|
| 86 | + } else { |
|
| 89 | 87 | $series->end_date = NULL; |
| 90 | 88 | } |
| 91 | 89 | |
@@ -37,7 +37,7 @@ discard block |
||
| 37 | 37 | |
| 38 | 38 | $series->save(); |
| 39 | 39 | |
| 40 | - return redirect()->route('association.series', ['association' => Association::find($request->association_id)]); |
|
| 40 | + return redirect()->route('association.series', [ 'association' => Association::find($request->association_id) ]); |
|
| 41 | 41 | } |
| 42 | 42 | |
| 43 | 43 | public function edit(Series $series) { |
@@ -95,13 +95,13 @@ discard block |
||
| 95 | 95 | |
| 96 | 96 | $series->save(); |
| 97 | 97 | |
| 98 | - $request->session()->flash('message', __('Successfully updated series :series!', ['series' => $series->name])); |
|
| 98 | + $request->session()->flash('message', __('Successfully updated series :series!', [ 'series' => $series->name ])); |
|
| 99 | 99 | |
| 100 | - return redirect()->route('series.view', ['series' => $series]); |
|
| 100 | + return redirect()->route('series.view', [ 'series' => $series ]); |
|
| 101 | 101 | } |
| 102 | 102 | |
| 103 | 103 | public function schedules(Series $series) { |
| 104 | - return view('series.schedules', ['series' => $series]); |
|
| 104 | + return view('series.schedules', [ 'series' => $series ]); |
|
| 105 | 105 | } |
| 106 | 106 | |
| 107 | 107 | } |
@@ -50,9 +50,9 @@ discard block |
||
| 50 | 50 | protected function validator(array $data) |
| 51 | 51 | { |
| 52 | 52 | return Validator::make($data, [ |
| 53 | - 'name' => ['required', 'string', 'max:255'], |
|
| 54 | - 'email' => ['required', 'string', 'email', 'max:255', 'unique:users'], |
|
| 55 | - 'password' => ['required', 'string', 'min:8', 'confirmed'], |
|
| 53 | + 'name' => [ 'required', 'string', 'max:255' ], |
|
| 54 | + 'email' => [ 'required', 'string', 'email', 'max:255', 'unique:users' ], |
|
| 55 | + 'password' => [ 'required', 'string', 'min:8', 'confirmed' ], |
|
| 56 | 56 | ]); |
| 57 | 57 | } |
| 58 | 58 | |
@@ -65,9 +65,9 @@ discard block |
||
| 65 | 65 | protected function create(array $data) |
| 66 | 66 | { |
| 67 | 67 | $user = User::create([ |
| 68 | - 'name' => $data['name'], |
|
| 69 | - 'email' => $data['email'], |
|
| 70 | - 'password' => Hash::make($data['password']), |
|
| 68 | + 'name' => $data[ 'name' ], |
|
| 69 | + 'email' => $data[ 'email' ], |
|
| 70 | + 'password' => Hash::make($data[ 'password' ]), |
|
| 71 | 71 | ]); |
| 72 | 72 | |
| 73 | 73 | Bouncer::assign('authenticated')->to($user); |
@@ -22,8 +22,7 @@ |
||
| 22 | 22 | 'associations' => $associations, |
| 23 | 23 | 'series' => $series, |
| 24 | 24 | ]); |
| 25 | - } |
|
| 26 | - else { |
|
| 25 | + } else { |
|
| 27 | 26 | return view('denied'); |
| 28 | 27 | } |
| 29 | 28 | } |