Passed
Pull Request — develop (#6)
by
unknown
03:18
created
app/Http/Controllers/EnrollmentExchangeController.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -34,10 +34,10 @@  discard block
 block discarded – undo
34 34
     public function create($id)
35 35
     {
36 36
         try {
37
-            $data = DB::transaction(function () use ($id) {
37
+            $data = DB::transaction(function() use ($id) {
38 38
                 $enrollment = Auth::student()->enrollments()->findOrFail($id);
39 39
 
40
-                if (! $enrollment->availableForExchange()) {
40
+                if ( ! $enrollment->availableForExchange()) {
41 41
                     throw new \LogicException('The enrollment is not available for exchange.');
42 42
                 }
43 43
 
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
                 return compact('enrollment', 'matchingEnrollments');
49 49
             });
50 50
 
51
-            $data['matchingEnrollments'] = $data['matchingEnrollments']->map(function ($item) {
51
+            $data['matchingEnrollments'] = $data['matchingEnrollments']->map(function($item) {
52 52
                 return [
53 53
                     'id' => $item->id,
54 54
                     '_toString' => $item->present()->inlineToString(),
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
     public function store($id, CreateRequest $request)
75 75
     {
76 76
         try {
77
-            $exchange = DB::transaction(function () use ($id, $request) {
77
+            $exchange = DB::transaction(function() use ($id, $request) {
78 78
                 $this->validate($request, [
79 79
                     'enrollment_id' => 'exists:enrollments,id',
80 80
                 ]);
Please login to merge, or discard this patch.
app/Http/Controllers/ExchangeController.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
      */
34 34
     public function confirm($id)
35 35
     {
36
-        $exchange = DB::transaction(function () use ($id) {
36
+        $exchange = DB::transaction(function() use ($id) {
37 37
             $exchange = Auth::student()->proposedExchanges()->findOrFail($id);
38 38
 
39 39
             return $exchange->perform();
@@ -55,10 +55,10 @@  discard block
 block discarded – undo
55 55
     {
56 56
         try {
57 57
             $id = $request->input('enrollment_id');
58
-            $data = DB::transaction(function () use ($id) {
58
+            $data = DB::transaction(function() use ($id) {
59 59
                 $enrollment = Auth::student()->enrollments()->findOrFail($id);
60 60
 
61
-                if (! $enrollment->availableForExchange()) {
61
+                if ( ! $enrollment->availableForExchange()) {
62 62
                     throw new \LogicException('The enrollment is not available for exchange.');
63 63
                 }
64 64
 
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
                 return compact('enrollment', 'matchingEnrollments', 'shiftsAvailable');
80 80
             });
81 81
 
82
-            $data['matchingEnrollments'] = $data['matchingEnrollments']->map(function ($item) {
82
+            $data['matchingEnrollments'] = $data['matchingEnrollments']->map(function($item) {
83 83
                 return [
84 84
                     'id' => $item->id,
85 85
                     '_toString' => $item->present()->inlineToString(),
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
      */
104 104
     public function decline($id)
105 105
     {
106
-        $exchange = DB::transaction(function () use ($id) {
106
+        $exchange = DB::transaction(function() use ($id) {
107 107
             $exchange = Auth::student()->proposedExchanges()->findOrFail($id);
108 108
             $exchange->delete();
109 109
 
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
      */
125 125
     public function destroy($id)
126 126
     {
127
-        DB::transaction(function () use ($id) {
127
+        DB::transaction(function() use ($id) {
128 128
             Auth::student()->requestedExchanges()->findOrFail($id)->delete();
129 129
         });
130 130
         flash('The shift exchange request was successfully deleted.')->success();
Please login to merge, or discard this patch.