Skip to content

Commit

Permalink
expliclty set
Browse files Browse the repository at this point in the history
  • Loading branch information
edalzell committed Feb 21, 2024
1 parent a4a7773 commit 6978c30
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/Types/Event.php
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ public function toICalendarEvents(): array
protected function supplement(CarbonInterface $date): ?Entry
{
return unserialize(serialize($this->event))
->setSupplement('multi_day', true)
->setSupplement('start', $date->setTimeFromTimeString($this->startTime()))
->setSupplement('end', $date->setTimeFromTimeString($this->endTime()))
->setSupplement('has_end_time', $this->hasEndTime());
Expand Down
2 changes: 2 additions & 0 deletions src/Types/MultiDayEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ protected function supplement(CarbonInterface $date): ?Entry
return tap(
unserialize(serialize($this->event)),
fn (Entry $occurrence) => $occurrence
->setSupplement('multi_day', true)
->setSupplement('collapse_multi_days', true)
->setSupplement('start', $this->start())
->setSupplement('end', $this->end())
Expand All @@ -116,6 +117,7 @@ protected function supplement(CarbonInterface $date): ?Entry
unserialize(serialize($this->event)),
fn (Entry $occurrence) => $occurrence
->setSupplement('all_day', $day->isAllDay())
->setSupplement('multi_day', true)
->setSupplement('collapse_multi_days', $this->collapseMultiDays)
->setSupplement('start', $day->start())
->setSupplement('end', $day->end())
Expand Down

0 comments on commit 6978c30

Please sign in to comment.