@@ -31,11 +31,11 @@ discard block |
||
| 31 | 31 | public function create($enrollmentId) |
| 32 | 32 | { |
| 33 | 33 | try { |
| 34 | - $data = DB::transaction(function () use ($enrollmentId) { |
|
| 34 | + $data = DB::transaction(function() use ($enrollmentId) { |
|
| 35 | 35 | $enrollment = Enrollment::ownedBy(auth()->user()->student) |
| 36 | 36 | ->findOrFail($enrollmentId); |
| 37 | 37 | |
| 38 | - if (! $enrollment->availableForExchange()) { |
|
| 38 | + if ( ! $enrollment->availableForExchange()) { |
|
| 39 | 39 | throw new \LogicException('The enrollment is not available for exchange.'); |
| 40 | 40 | } |
| 41 | 41 | |
@@ -46,7 +46,7 @@ discard block |
||
| 46 | 46 | return compact('enrollment', 'matchingEnrollments'); |
| 47 | 47 | }); |
| 48 | 48 | |
| 49 | - $data['matchingEnrollments'] = $data['matchingEnrollments']->map(function ($item) { |
|
| 49 | + $data['matchingEnrollments'] = $data['matchingEnrollments']->map(function($item) { |
|
| 50 | 50 | return [ |
| 51 | 51 | 'id' => $item->id, |
| 52 | 52 | '_toString' => $item->present()->inlineToString(), |
@@ -72,7 +72,7 @@ discard block |
||
| 72 | 72 | public function store($enrollmentId, CreateRequest $request) |
| 73 | 73 | { |
| 74 | 74 | try { |
| 75 | - $exchange = DB::transaction(function () use ($enrollmentId, $request) { |
|
| 75 | + $exchange = DB::transaction(function() use ($enrollmentId, $request) { |
|
| 76 | 76 | $this->validate($request, [ |
| 77 | 77 | 'to_enrollment_id' => 'exists:enrollments,id', |
| 78 | 78 | ]); |
@@ -120,7 +120,7 @@ discard block |
||
| 120 | 120 | */ |
| 121 | 121 | public function destroy($id) |
| 122 | 122 | { |
| 123 | - DB::transaction(function () use ($id) { |
|
| 123 | + DB::transaction(function() use ($id) { |
|
| 124 | 124 | Exchange::ownedBy(auth()->user()->student) |
| 125 | 125 | ->findOrFail($id) |
| 126 | 126 | ->delete(); |