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,