@@ -19,7 +19,7 @@ |
||
19 | 19 | */ |
20 | 20 | public function handle($request, Closure $next) |
21 | 21 | { |
22 | - if (! Auth::user()->isStudent()) { |
|
22 | + if ( ! Auth::user()->isStudent()) { |
|
23 | 23 | abort(404); |
24 | 24 | } |
25 | 25 |
@@ -19,7 +19,7 @@ |
||
19 | 19 | */ |
20 | 20 | public function handle($request, Closure $next) |
21 | 21 | { |
22 | - if (! Auth::user()->isAdmin()) { |
|
22 | + if ( ! Auth::user()->isAdmin()) { |
|
23 | 23 | abort(404); |
24 | 24 | } |
25 | 25 |
@@ -30,7 +30,7 @@ discard block |
||
30 | 30 | public function store($id) |
31 | 31 | { |
32 | 32 | try { |
33 | - $course = DB::transaction(function () use ($id) { |
|
33 | + $course = DB::transaction(function() use ($id) { |
|
34 | 34 | $course = Course::findOrFail($id); |
35 | 35 | student()->enroll($course); |
36 | 36 | |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | */ |
56 | 56 | public function destroy($id) |
57 | 57 | { |
58 | - $course = DB::transaction(function () use ($id) { |
|
58 | + $course = DB::transaction(function() use ($id) { |
|
59 | 59 | $course = Course::findOrFail($id); |
60 | 60 | student()->unenroll($course); |
61 | 61 |
@@ -33,10 +33,10 @@ discard block |
||
33 | 33 | public function create($id) |
34 | 34 | { |
35 | 35 | try { |
36 | - $data = DB::transaction(function () use ($id) { |
|
36 | + $data = DB::transaction(function() use ($id) { |
|
37 | 37 | $enrollment = student()->enrollments()->findOrFail($id); |
38 | 38 | |
39 | - if (! $enrollment->availableForExchange()) { |
|
39 | + if ( ! $enrollment->availableForExchange()) { |
|
40 | 40 | throw new \LogicException('The enrollment is not available for exchange.'); |
41 | 41 | } |
42 | 42 | |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | return compact('enrollment', 'matchingEnrollments'); |
48 | 48 | }); |
49 | 49 | |
50 | - $data['matchingEnrollments'] = $data['matchingEnrollments']->map(function ($item) { |
|
50 | + $data['matchingEnrollments'] = $data['matchingEnrollments']->map(function($item) { |
|
51 | 51 | return [ |
52 | 52 | 'id' => $item->id, |
53 | 53 | '_toString' => $item->present()->inlineToString(), |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | public function store($id, CreateRequest $request) |
74 | 74 | { |
75 | 75 | try { |
76 | - $exchange = DB::transaction(function () use ($id, $request) { |
|
76 | + $exchange = DB::transaction(function() use ($id, $request) { |
|
77 | 77 | $this->validate($request, [ |
78 | 78 | 'to_enrollment_id' => 'exists:enrollments,id', |
79 | 79 | ]); |
@@ -30,7 +30,7 @@ discard block |
||
30 | 30 | */ |
31 | 31 | public function confirm($id) |
32 | 32 | { |
33 | - $exchange = DB::transaction(function () use ($id) { |
|
33 | + $exchange = DB::transaction(function() use ($id) { |
|
34 | 34 | $exchange = student()->proposedExchanges()->findOrFail($id); |
35 | 35 | |
36 | 36 | return $exchange->perform(); |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | */ |
52 | 52 | public function decline($id) |
53 | 53 | { |
54 | - $exchange = DB::transaction(function () use ($id) { |
|
54 | + $exchange = DB::transaction(function() use ($id) { |
|
55 | 55 | $exchange = student()->proposedExchanges()->findOrFail($id); |
56 | 56 | $exchange->delete(); |
57 | 57 | |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | */ |
74 | 74 | public function destroy($id) |
75 | 75 | { |
76 | - DB::transaction(function () use ($id) { |
|
76 | + DB::transaction(function() use ($id) { |
|
77 | 77 | student()->requestedExchanges()->findOrFail($id)->delete(); |
78 | 78 | }); |
79 | 79 |