Passed
Push — develop ( 77087a...7447be )
by Francisco
03:37
created
app/Http/Controllers/ExchangeController.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
      */
32 32
     public function confirm($id)
33 33
     {
34
-        $exchange = DB::transaction(function () use ($id) {
34
+        $exchange = DB::transaction(function() use ($id) {
35 35
             $exchange = Auth::student()->proposedExchanges()->findOrFail($id);
36 36
 
37 37
             return $exchange->perform();
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
      */
52 52
     public function decline($id)
53 53
     {
54
-        $exchange = DB::transaction(function () use ($id) {
54
+        $exchange = DB::transaction(function() use ($id) {
55 55
             $exchange = Auth::student()->proposedExchanges()->findOrFail($id);
56 56
             $exchange->delete();
57 57
 
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
      */
73 73
     public function destroy($id)
74 74
     {
75
-        DB::transaction(function () use ($id) {
75
+        DB::transaction(function() use ($id) {
76 76
             Auth::student()->requestedExchanges()->findOrFail($id)->delete();
77 77
         });
78 78
         flash('The shift exchange request was successfully deleted.')->success();
Please login to merge, or discard this patch.
app/Http/Controllers/DashboardController.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -35,13 +35,13 @@  discard block
 block discarded – undo
35 35
      */
36 36
     protected function adminDashboard()
37 37
     {
38
-        $courses = DB::transaction(function () {
38
+        $courses = DB::transaction(function() {
39 39
             return Course::withCount('enrollments')
40 40
                 ->orderedList()
41 41
                 ->get();
42 42
         });
43 43
 
44
-        $courses = $courses->groupBy(function ($course) {
44
+        $courses = $courses->groupBy(function($course) {
45 45
             return $course->present()->getOrdinalYear();
46 46
         });
47 47
 
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
      */
56 56
     protected function studentDashboard()
57 57
     {
58
-        $data = DB::transaction(function () {
58
+        $data = DB::transaction(function() {
59 59
             $proposedExchanges = Auth::student()->proposedExchanges()->get();
60 60
             $requestedExchanges = Auth::student()->requestedExchanges()->get();
61 61
             $enrollments = Auth::student()->enrollments()
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
             return compact('proposedExchanges', 'requestedExchanges', 'enrollments');
67 67
         });
68 68
 
69
-        $data['enrollments'] = $data['enrollments']->groupBy(function ($enrollment) {
69
+        $data['enrollments'] = $data['enrollments']->groupBy(function($enrollment) {
70 70
             return $enrollment->course->present()->getOrdinalYear();
71 71
         });
72 72
 
Please login to merge, or discard this patch.
app/Http/Controllers/Admin/ExchangeController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
24 24
      */
25 25
     public function index(ExchangeRegistry $registry)
26 26
     {
27
-        $history = DB::transaction(function () use ($registry) {
27
+        $history = DB::transaction(function() use ($registry) {
28 28
             return $registry->paginate();
29 29
         });
30 30
 
Please login to merge, or discard this patch.
app/Http/Controllers/Admin/CourseController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@
 block discarded – undo
26 26
      */
27 27
     public function show($id)
28 28
     {
29
-        $data = DB::transaction(function () use ($id) {
29
+        $data = DB::transaction(function() use ($id) {
30 30
             $course = Course::findOrFail($id);
31 31
             $enrollments = $course->enrollments()
32 32
                 ->with('student.user')
Please login to merge, or discard this patch.
app/Http/Controllers/Admin/EnrollmentController.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
     public function export()
33 33
     {
34 34
         // Get the list of students enrolled on each course
35
-        $enrollments = DB::transaction(function () {
35
+        $enrollments = DB::transaction(function() {
36 36
             $enrollments = Enrollment::with('student', 'course')
37 37
                 ->get()
38 38
                 ->sortByDesc('courses.name');
@@ -41,8 +41,8 @@  discard block
 block discarded – undo
41 41
         });
42 42
 
43 43
         // Export to CSV
44
-        $result = Excel::create('enrollments', function ($excel) use ($enrollments) {
45
-            $excel->sheet('Enrollments', function ($sheet) use ($enrollments) {
44
+        $result = Excel::create('enrollments', function($excel) use ($enrollments) {
45
+            $excel->sheet('Enrollments', function($sheet) use ($enrollments) {
46 46
                 $sheet->loadView('enrollments.export', compact('enrollments'));
47 47
             });
48 48
         });
@@ -63,10 +63,10 @@  discard block
 block discarded – undo
63 63
             $file = $request->enrollments;
64 64
             $path = $file->path();
65 65
 
66
-            Excel::load($path, function ($reader) {
67
-                DB::transaction(function () use ($reader) {
66
+            Excel::load($path, function($reader) {
67
+                DB::transaction(function() use ($reader) {
68 68
                     // Loop for all the rows of the table
69
-                    $reader->each(function ($row, $index) {
69
+                    $reader->each(function($row, $index) {
70 70
                         $index += 2; // Skip header
71 71
 
72 72
                         // Get the models of the given ids
Please login to merge, or discard this patch.
app/Http/Controllers/Admin/SettingsController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@
 block discarded – undo
37 37
      */
38 38
     public function update(UpdateRequest $request)
39 39
     {
40
-        DB::transaction(function () use ($request) {
40
+        DB::transaction(function() use ($request) {
41 41
             app('settings')->update($request->all());
42 42
         });
43 43
         flash('Settings were successfully updated.')->success();
Please login to merge, or discard this patch.