Passed
Push — master ( a041ce...14eb61 )
by Thomas
09:54
created
app/Listeners/UpdateCourseEvents.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@
 block discarded – undo
41 41
 
42 42
             // if there is a coursetime for today, create the event
43 43
             if ($course->times->contains('day', $courseStartDate->format('w'))) {
44
-                Event::create(['course_id' => $course->id, 'teacher_id' => $course->teacher_id, 'room_id' => $course->room_id, 'start' => $courseStartDate->setTimeFromTimeString($course->times->where('day', $courseStartDate->format('w'))->first()->start)->toDateTimeString(), 'end' => $courseStartDate->setTimeFromTimeString($course->times->where('day', $courseStartDate->format('w'))->first()->end)->toDateTimeString(), 'name' => $course->name, 'course_time_id' => $course->times->where('day', $courseStartDate->format('w'))->first()->id, 'exempt_attendance' => $course->exempt_attendance,]);
44
+                Event::create(['course_id' => $course->id, 'teacher_id' => $course->teacher_id, 'room_id' => $course->room_id, 'start' => $courseStartDate->setTimeFromTimeString($course->times->where('day', $courseStartDate->format('w'))->first()->start)->toDateTimeString(), 'end' => $courseStartDate->setTimeFromTimeString($course->times->where('day', $courseStartDate->format('w'))->first()->end)->toDateTimeString(), 'name' => $course->name, 'course_time_id' => $course->times->where('day', $courseStartDate->format('w'))->first()->id, 'exempt_attendance' => $course->exempt_attendance, ]);
45 45
             }
46 46
             $courseStartDate->addDay();
47 47
         }
Please login to merge, or discard this patch.