Passed
Push — develop ( a8f030...cce3fe )
by Francisco
02:56
created
app/Judite/Models/Exchange.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -65,11 +65,11 @@
 block discarded – undo
65 65
      */
66 66
     public function setExchangeEnrollments(Enrollment $from, Enrollment $to) : Exchange
67 67
     {
68
-        if (! $from->availableForExchange() || is_null($to->shift)) {
68
+        if ( ! $from->availableForExchange() || is_null($to->shift)) {
69 69
             throw new EnrollmentCannotBeExchangedException();
70 70
         }
71 71
 
72
-        if (! $from->course->is($to->course)) {
72
+        if ( ! $from->course->is($to->course)) {
73 73
             throw new ExchangeEnrollmentsOnDifferentCoursesException();
74 74
         }
75 75
 
Please login to merge, or discard this patch.
app/Http/Controllers/ExchangeController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
      */
31 31
     public function confirm($id)
32 32
     {
33
-        $exchange = DB::transaction(function () use ($id) {
33
+        $exchange = DB::transaction(function() use ($id) {
34 34
             $exchange = Exchange::findOrFail($id);
35 35
             $this->checkDecideAuthorization($exchange);
36 36
 
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
      */
54 54
     public function decline($id)
55 55
     {
56
-        $exchange = DB::transaction(function () use ($id) {
56
+        $exchange = DB::transaction(function() use ($id) {
57 57
             $exchange = Exchange::findOrFail($id);
58 58
             $this->checkDecideAuthorization($exchange);
59 59
             $exchange->delete();
Please login to merge, or discard this patch.
app/Http/Controllers/EnrollmentController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
     public function store($courseId)
27 27
     {
28 28
         try {
29
-            $course = DB::transaction(function () use ($courseId) {
29
+            $course = DB::transaction(function() use ($courseId) {
30 30
                 $course = Course::findOrFail($courseId);
31 31
                 $student = auth()->user()->student;
32 32
                 $student->enroll($course);
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
      */
53 53
     public function destroy($courseId)
54 54
     {
55
-        $course = DB::transaction(function () use ($courseId) {
55
+        $course = DB::transaction(function() use ($courseId) {
56 56
             $course = Course::findOrFail($courseId);
57 57
             auth()->user()->student->removeEnrollmentInCourse($course);
58 58
 
Please login to merge, or discard this patch.
app/Http/Controllers/EnrollmentExchangeController.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
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
 
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 
Please login to merge, or discard this patch.