From 5e424d2884b6f07cf10072631c5fc17d2ae7b9d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1t=C3=A9=20Kocsis?= Date: Thu, 26 Aug 2021 15:26:04 +0200 Subject: [PATCH] Fix a few ext/date return types --- Zend/Optimizer/zend_func_infos.h | 2 +- ext/date/php_date.stub.php | 7 ++++++- ext/date/php_date_arginfo.h | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/Zend/Optimizer/zend_func_infos.h b/Zend/Optimizer/zend_func_infos.h index 56b5a78d786..39cdfd97d06 100644 --- a/Zend/Optimizer/zend_func_infos.h +++ b/Zend/Optimizer/zend_func_infos.h @@ -47,7 +47,7 @@ static const func_info_t func_infos[] = { F1("timezone_name_get", MAY_BE_STRING), F1("timezone_name_from_abbr", MAY_BE_STRING|MAY_BE_FALSE), F1("timezone_transitions_get", MAY_BE_ARRAY|MAY_BE_ARRAY_KEY_LONG|MAY_BE_ARRAY_KEY_STRING|MAY_BE_ARRAY_OF_ANY|MAY_BE_FALSE), - F1("timezone_location_get", MAY_BE_ARRAY|MAY_BE_ARRAY_KEY_STRING|MAY_BE_ARRAY_OF_DOUBLE|MAY_BE_ARRAY_OF_STRING), + F1("timezone_location_get", MAY_BE_ARRAY|MAY_BE_ARRAY_KEY_STRING|MAY_BE_ARRAY_OF_DOUBLE|MAY_BE_ARRAY_OF_STRING|MAY_BE_FALSE), F1("timezone_identifiers_list", MAY_BE_ARRAY|MAY_BE_ARRAY_KEY_LONG|MAY_BE_ARRAY_OF_STRING), F1("timezone_abbreviations_list", MAY_BE_ARRAY|MAY_BE_ARRAY_KEY_STRING|MAY_BE_ARRAY_OF_ARRAY), F1("timezone_version_get", MAY_BE_STRING), diff --git a/ext/date/php_date.stub.php b/ext/date/php_date.stub.php index e0a573ae328..57de0c1363c 100644 --- a/ext/date/php_date.stub.php +++ b/ext/date/php_date.stub.php @@ -128,7 +128,7 @@ function timezone_transitions_get( DateTimeZone $object, int $timestampBegin = PHP_INT_MIN, int $timestampEnd = PHP_INT_MAX): array|false {} /** - * @return array + * @return array|false * @refcount 1 */ function timezone_location_get(DateTimeZone $object): array|false {} @@ -226,6 +226,7 @@ class DateTime implements DateTimeInterface public static function createFromFormat(string $format, string $datetime, ?DateTimeZone $timezone = null): DateTime|false {} /** + * @return array|false * @tentative-return-type * @alias date_get_last_errors */ @@ -327,6 +328,7 @@ class DateTimeImmutable implements DateTimeInterface public static function createFromFormat(string $format, string $datetime, ?DateTimeZone $timezone = null): DateTimeImmutable|false {} /** + * @return array|false * @tentative-return-type * @alias date_get_last_errors */ @@ -415,18 +417,21 @@ class DateTimeZone public function getTransitions(int $timestampBegin = PHP_INT_MIN, int $timestampEnd = PHP_INT_MAX): array|false {} /** + * @return array|false * @tentative-return-type * @alias timezone_location_get */ public function getLocation(): array|false {} /** + * @return array * @tentative-return-type * @alias timezone_abbreviations_list */ public static function listAbbreviations(): array {} /** + * @return array * @tentative-return-type * @alias timezone_identifiers_list */ diff --git a/ext/date/php_date_arginfo.h b/ext/date/php_date_arginfo.h index ac92206c972..5791643e9bc 100644 --- a/ext/date/php_date_arginfo.h +++ b/ext/date/php_date_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: 18e879f3036f0d9685dfe73e43c13ecdae2d93ee */ + * Stub hash: 0f3ef0e61bf6b00a4e33375282097b3dfa51da66 */ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_strtotime, 0, 1, MAY_BE_LONG|MAY_BE_FALSE) ZEND_ARG_TYPE_INFO(0, datetime, IS_STRING, 0)