From edd5a4b09c963cc4a1ca4ae8efde904874497d4b Mon Sep 17 00:00:00 2001 From: Ben Date: Fri, 16 Feb 2024 11:31:07 +0000 Subject: [PATCH] Fix updated Carbon method signatures and return types --- src/Entities/LeekDuckEvent.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Entities/LeekDuckEvent.php b/src/Entities/LeekDuckEvent.php index a687eb4c..51de8ef1 100644 --- a/src/Entities/LeekDuckEvent.php +++ b/src/Entities/LeekDuckEvent.php @@ -22,7 +22,7 @@ public function __construct( public string $endDateString, public Carbon $startDate, public Carbon $endDate, - public int $durationInDays, + public float $durationInDays, public bool $isFullDay, public ?array $extraData ) { @@ -35,14 +35,14 @@ public static function create(array $event, string $timezone = CalendarService:: { $startDate = Carbon::parse( time: $event['start'], - tz: new \DateTimeZone( + timezone: new \DateTimeZone( timezone: $timezone ) ); $endDate = Carbon::parse( time: $event['end'], - tz: new \DateTimeZone( + timezone: new \DateTimeZone( timezone: $timezone ) ); @@ -100,14 +100,14 @@ public function changeTimezone(string $timezone = CalendarService::TIMEZONE): vo { $this->startDate = Carbon::parse( time: $this->startDateString, - tz: new \DateTimeZone( + timezone: new \DateTimeZone( timezone: $timezone ) ); $this->endDate = Carbon::parse( time: $this->endDateString, - tz: new \DateTimeZone( + timezone: new \DateTimeZone( timezone: $timezone ) );