@@ -14,11 +14,11 @@ |
||
14 | 14 | */ |
15 | 15 | public function index() |
16 | 16 | { |
17 | - $courses = DB::transaction(function () { |
|
17 | + $courses = DB::transaction(function() { |
|
18 | 18 | return Course::orderedList()->get(); |
19 | 19 | }); |
20 | 20 | |
21 | - $courses = $courses->groupBy(function ($course) { |
|
21 | + $courses = $courses->groupBy(function($course) { |
|
22 | 22 | return $course->present()->getOrdinalYear(); |
23 | 23 | }); |
24 | 24 |
@@ -27,7 +27,7 @@ |
||
27 | 27 | */ |
28 | 28 | public function update(UpdateRequest $request) |
29 | 29 | { |
30 | - DB::transaction(function () use ($request) { |
|
30 | + DB::transaction(function() use ($request) { |
|
31 | 31 | $settings = Settings::first(); |
32 | 32 | $settings->update($request->input()); |
33 | 33 | }); |
@@ -14,7 +14,7 @@ |
||
14 | 14 | */ |
15 | 15 | public function boot() |
16 | 16 | { |
17 | - View::composer('*', function ($view) { |
|
17 | + View::composer('*', function($view) { |
|
18 | 18 | $view->with('settings', app('settings')); |
19 | 19 | }); |
20 | 20 | } |
@@ -16,7 +16,7 @@ |
||
16 | 16 | */ |
17 | 17 | public function show($id) |
18 | 18 | { |
19 | - $data = DB::transaction(function () use ($id) { |
|
19 | + $data = DB::transaction(function() use ($id) { |
|
20 | 20 | $data = []; |
21 | 21 | $data['course'] = Course::findOrFail($id); |
22 | 22 | $data['enrollments'] = $data['course']->enrollments() |
@@ -16,7 +16,7 @@ |
||
16 | 16 | */ |
17 | 17 | public function handle($request, Closure $next) |
18 | 18 | { |
19 | - if (! app('settings')->withinExchangePeriod()) { |
|
19 | + if ( ! app('settings')->withinExchangePeriod()) { |
|
20 | 20 | flash('The exchanges period is closed. You are not allowed to perform this action.')->error(); |
21 | 21 | |
22 | 22 | return redirect()->route('home'); |
@@ -16,7 +16,7 @@ |
||
16 | 16 | */ |
17 | 17 | public function handle($request, Closure $next) |
18 | 18 | { |
19 | - if (! app('settings')->withinEnrollmentPeriod()) { |
|
19 | + if ( ! app('settings')->withinEnrollmentPeriod()) { |
|
20 | 20 | flash('The enrollments period is closed. You are not allowed to perform this action.')->error(); |
21 | 21 | |
22 | 22 | return redirect()->route('home'); |
@@ -68,7 +68,7 @@ |
||
68 | 68 | */ |
69 | 69 | protected function create(array $data) |
70 | 70 | { |
71 | - $user = DB::transaction(function () use ($data) { |
|
71 | + $user = DB::transaction(function() use ($data) { |
|
72 | 72 | $user = User::make([ |
73 | 73 | 'name' => $data['name'], |
74 | 74 | 'email' => $data['student_number'].'@alunos.uminho.pt', |
@@ -15,7 +15,7 @@ discard block |
||
15 | 15 | */ |
16 | 16 | public function boot() |
17 | 17 | { |
18 | - Validator::extend('student_number', function ($attribute, $value, $parameters, $validator) { |
|
18 | + Validator::extend('student_number', function($attribute, $value, $parameters, $validator) { |
|
19 | 19 | return preg_match('/^(a|pg)[0-9]+$/', $value) === 1; |
20 | 20 | }); |
21 | 21 | } |
@@ -25,11 +25,11 @@ discard block |
||
25 | 25 | */ |
26 | 26 | public function register() |
27 | 27 | { |
28 | - $this->app->singleton(ExchangeRegistry::class, function ($app) { |
|
28 | + $this->app->singleton(ExchangeRegistry::class, function($app) { |
|
29 | 29 | return new EloquentExchangeRegistry(); |
30 | 30 | }); |
31 | 31 | |
32 | - $this->app->singleton('settings', function ($app) { |
|
32 | + $this->app->singleton('settings', function($app) { |
|
33 | 33 | return Settings::firstOrNew([]); |
34 | 34 | }); |
35 | 35 | } |
@@ -15,7 +15,7 @@ |
||
15 | 15 | */ |
16 | 16 | public function index(ExchangeRegistry $exchangeLogger) |
17 | 17 | { |
18 | - $history = DB::transaction(function () use ($exchangeLogger) { |
|
18 | + $history = DB::transaction(function() use ($exchangeLogger) { |
|
19 | 19 | return $exchangeLogger->paginate(); |
20 | 20 | }); |
21 | 21 |