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