diff --git a/lib/DateTimeImmutable.php b/lib/DateTimeImmutable.php index 2ce4933..2ec1317 100644 --- a/lib/DateTimeImmutable.php +++ b/lib/DateTimeImmutable.php @@ -55,7 +55,7 @@ public function getInnerDateTime(): \DateTimeImmutable * @param DateTimeZone|null $timezone * @throws DatetimeException */ - public static function createFromFormat($format, $time, $timezone = null) + public static function createFromFormat(string $format, string $time, ?DateTimeZone $timezone = null): DateTimeImmutable|false { $datetime = \DateTimeImmutable::createFromFormat($format, $time, $timezone); if ($datetime === false) {