From bde2564771610ed7050e62326c0ac1ce78a962eb Mon Sep 17 00:00:00 2001 From: Ghlen Nagels Date: Mon, 4 Dec 2023 01:13:15 -0500 Subject: [PATCH] fixed typing error --- src/Formatter/Specialised/BoltOGMTranslator.php | 5 ++++- src/Types/DateTimeZoneId.php | 3 +++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/Formatter/Specialised/BoltOGMTranslator.php b/src/Formatter/Specialised/BoltOGMTranslator.php index d0788fad..aa3c780b 100644 --- a/src/Formatter/Specialised/BoltOGMTranslator.php +++ b/src/Formatter/Specialised/BoltOGMTranslator.php @@ -127,7 +127,10 @@ private function makeFromBoltLocalDateTime(BoltLocalDateTime $time): LocalDateTi private function makeBoltTimezoneIdentifier(BoltDateTimeZoneId $time): DateTimeZoneId { - return new DateTimeZoneId($time->seconds(), $time->nanoseconds(), $time->tz_id()); + /** @var non-empty-string $tzId */ + $tzId = $time->tz_id(); + + return new DateTimeZoneId($time->seconds(), $time->nanoseconds(), $tzId); } private function makeFromBoltDuration(BoltDuration $duration): Duration diff --git a/src/Types/DateTimeZoneId.php b/src/Types/DateTimeZoneId.php index 10fcc592..a390c1a7 100644 --- a/src/Types/DateTimeZoneId.php +++ b/src/Types/DateTimeZoneId.php @@ -34,6 +34,9 @@ */ final class DateTimeZoneId extends AbstractPropertyObject implements BoltConvertibleInterface { + /** + * @param non-empty-string $tzId + */ public function __construct( private int $seconds, private int $nanoseconds,