diff --git a/lib/DateTimeImmutable.php b/lib/DateTimeImmutable.php index 346d952f..5cedd24a 100644 --- a/lib/DateTimeImmutable.php +++ b/lib/DateTimeImmutable.php @@ -51,7 +51,7 @@ public function getInnerDateTime(): \DateTimeImmutable * @param \DateTimeZone|null $timezone * @throws DatetimeException */ - public static function createFromFormat($format, $time, $timezone = null) + public static function createFromFormat($format, $time, $timezone = null): self { $datetime = \DateTimeImmutable::createFromFormat($format, $time, $timezone); if ($datetime === false) {