Passed
Push — master ( 952446...f0a3f9 )
by Thomas
07:48 queued 11s
created
app/Models/Result.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
 
24 24
         if (config('app.send_emails_for_results')) {
25 25
             // when a result is added, send a notification
26
-            static::saved(function (self $result) {
26
+            static::saved(function(self $result) {
27 27
                 Mail::to($result->enrollment->student->user->email)->locale($result->enrollment->student->user->locale)->queue(new ResultNotification($result->enrollment->course, $result->enrollment->student->user));
28 28
             });
29 29
         }
Please login to merge, or discard this patch.
app/Models/Attendance.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@
 block discarded – undo
21 21
         parent::boot();
22 22
 
23 23
         // when an attendance record is added, we check if this is an absence
24
-        static::saved(function (self $attendance) {
24
+        static::saved(function(self $attendance) {
25 25
             if (config('app.send_emails_for_absences') && $attendance->attendance_type_id == 4) { // todo move to configurable settings
26 26
                 // Log::info('Absence marked for student '.$attendance->student->name);
27 27
                 // will check the record again and send a notification if it hasn't changed
Please login to merge, or discard this patch.
app/Models/Policies/CommentPolicy.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,6 +26,6 @@
 block discarded – undo
26 26
      */
27 27
     public function store_student_comment(User $user, Student $student)
28 28
     {
29
-        return ($student->enrollments()->whereHas('course', fn ($q) => $q->where('teacher_id', $user->id))->count() > 0) || $user->can('comments.edit');
29
+        return ($student->enrollments()->whereHas('course', fn($q) => $q->where('teacher_id', $user->id))->count() > 0) || $user->can('comments.edit');
30 30
     }
31 31
 }
Please login to merge, or discard this patch.
app/Http/Controllers/ScheduledPaymentController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -172,7 +172,7 @@
 block discarded – undo
172 172
                         'price_b' => $enrollment->course->price_b,
173 173
                         'price_c' => $enrollment->course->price_c,
174 174
                     ]),
175
-                    'studentPriceCategory' => $enrollment->student?->price_category,
175
+                    'studentPriceCategory' => $enrollment->student ? ->price_category,
176 176
                 ]
177 177
             );
178 178
         }
Please login to merge, or discard this patch.
app/Http/Controllers/RoomController.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
             ->where('end', '<', Carbon::now()->addDays(90))
26 26
             ->orderBy('id', 'desc')
27 27
             ->get()
28
-            ->map(fn ($event) => [
28
+            ->map(fn($event) => [
29 29
                 'title' => $event->name,
30 30
                 'resourceId' => $event->room_id,
31 31
                 'start' => $event->start,
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
 
38 38
         $rooms = Room::all()->toArray();
39 39
 
40
-        $rooms = array_map(fn ($room) => [
40
+        $rooms = array_map(fn($room) => [
41 41
             'id' => $room['id'],
42 42
             'title' => $room['name'],
43 43
         ], $rooms);
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
         $unassigned_events = Event::with('course')
48 48
             ->whereNull('room_id')
49 49
             ->get()
50
-            ->map(fn ($event) => [
50
+            ->map(fn($event) => [
51 51
                 'title' => $event->name,
52 52
                 'resourceId' => 'tbd',
53 53
                 'start' => $event->start,
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
     public function show(Room $room)
71 71
     {
72 72
         $events = $room->events->toArray();
73
-        $events = array_map(fn ($event) => [
73
+        $events = array_map(fn($event) => [
74 74
             'title' => $event['name'],
75 75
             'start' => $event['start'],
76 76
             'end' => $event['end'],
Please login to merge, or discard this patch.
app/Models/EnrollmentStatusType.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@
 block discarded – undo
15 15
 
16 16
     public function styling()
17 17
     {
18
-        return match ($this->id) {
18
+        return match($this->id) {
19 19
             1 => 'warning',
20 20
             2 => 'info',
21 21
             default => 'danger',
Please login to merge, or discard this patch.
app/Models/Year.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@
 block discarded – undo
46 46
                 ->where('periods.year_id', $this->id)
47 47
                 ->whereIn('enrollments.status_id', ['1', '2']) // filter out cancelled enrollments, todo make this configurable.
48 48
                 ->where('enrollments.parent_id', null)->where('enrollments.deleted_at', null)
49
-                ->where(function ($query) {
49
+                ->where(function($query) {
50 50
                     return $query->where('students.gender_id', 0)->orWhereNull('students.gender_id');
51 51
                 })
52 52
                 ->distinct('student_id')->count('enrollments.student_id');
Please login to merge, or discard this patch.
app/Providers/AppServiceProvider.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -53,12 +53,12 @@
 block discarded – undo
53 53
 
54 54
         View::composer(
55 55
             ['partials.create_new_contact', 'students.edit-contact'],
56
-            function ($view) {
56
+            function($view) {
57 57
                 $view->with('contact_types', ContactRelationship::all());
58 58
             }
59 59
         );
60 60
 
61
-        View::composer('partials.add_book_to_student', function ($view) {
61
+        View::composer('partials.add_book_to_student', function($view) {
62 62
             $view->with('books', Book::all());
63 63
             $view->with('statuses', EnrollmentStatusType::all());
64 64
         });
Please login to merge, or discard this patch.
app/Http/Controllers/Admin/PaymentCrudController.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
                 'label' => __('Due Date'),
51 51
             ],
52 52
             false,
53
-            function ($value) { // if the filter is active, apply these constraints
53
+            function($value) { // if the filter is active, apply these constraints
54 54
                 $this->crud->addClause('where', 'date', '>=', Carbon::parse($value)->firstOfMonth());
55 55
                 $this->crud->addClause('where', 'date', '<=', Carbon::parse($value)->lastOfMonth());
56 56
             }
@@ -92,11 +92,11 @@  discard block
 block discarded – undo
92 92
     {
93 93
         $payment = Payment::findOrFail($id);
94 94
 
95
-        if (! backpack_user()->can('enrollments.edit')) {
95
+        if (!backpack_user()->can('enrollments.edit')) {
96 96
             abort(403);
97 97
         }
98 98
 
99
-        if (! $payment->invoice) {
99
+        if (!$payment->invoice) {
100 100
             abort(404, 'No enrollment found for this payment');
101 101
         }
102 102
 
Please login to merge, or discard this patch.