Completed
Push — develop ( 532ce1...0c86ee )
by Francisco
03:11
created
app/Http/Controllers/EnrollmentExchangeController.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -31,11 +31,11 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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();
Please login to merge, or discard this patch.