Completed
Push — develop ( 28bf94...773f3b )
by Francisco
03:17
created
app/Http/Controllers/ExchangeController.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
     public function create($enrollmentId)
35 35
     {
36 36
         try {
37
-            $data = DB::transaction(function () use ($enrollmentId) {
37
+            $data = DB::transaction(function() use ($enrollmentId) {
38 38
                 $enrollment = Enrollment::ownedBy(auth()->user()->student)
39 39
                     ->findOrFail($enrollmentId);
40 40
 
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
                 return compact('enrollment', 'matchingEnrollments');
52 52
             });
53 53
 
54
-            $data['matchingEnrollments'] = $data['matchingEnrollments']->map(function ($item) {
54
+            $data['matchingEnrollments'] = $data['matchingEnrollments']->map(function($item) {
55 55
                 return [
56 56
                     'id' => $item->id,
57 57
                     '_toString' => $item->present()->inlineToString(),
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
     public function store(CreateRequest $request)
77 77
     {
78 78
         try {
79
-            DB::transaction(function () use ($request) {
79
+            DB::transaction(function() use ($request) {
80 80
                 $this->validate($request, [
81 81
                     'from_enrollment_id' => 'exists:enrollments,id',
82 82
                     'to_enrollment_id' => 'exists:enrollments,id',
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
                 // already exists. If the inverse record is found then we will
91 91
                 // exchange and update both enrollments of this exchange.
92 92
                 $exchange = Exchange::findMatchingExchange($fromEnrollment, $toEnrollment);
93
-                if (! is_null($exchange)) {
93
+                if ( ! is_null($exchange)) {
94 94
                     return $exchange->perform();
95 95
                 }
96 96
 
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
      */
124 124
     public function storeConfirmation(Request $request)
125 125
     {
126
-        $exchange = DB::transaction(function () use ($request) {
126
+        $exchange = DB::transaction(function() use ($request) {
127 127
             $this->validate($request, [
128 128
                 'exchange_id' => 'exists:exchanges,id',
129 129
             ]);
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
      */
151 151
     public function storeDecline(Request $request)
152 152
     {
153
-        $exchange = DB::transaction(function () use ($request) {
153
+        $exchange = DB::transaction(function() use ($request) {
154 154
             $this->validate($request, [
155 155
                 'exchange_id' => 'exists:exchanges,id',
156 156
             ]);
@@ -179,7 +179,7 @@  discard block
 block discarded – undo
179 179
      */
180 180
     public function destroy(Request $request)
181 181
     {
182
-        DB::transaction(function () use ($request) {
182
+        DB::transaction(function() use ($request) {
183 183
             $this->validate($request, [
184 184
                 'exchange_id' => 'exists:exchanges,id',
185 185
             ]);
Please login to merge, or discard this patch.