mirror of
https://github.com/php/php-src.git
synced 2026-03-24 08:12:21 +01:00
Fix a few ext/date return types
This commit is contained in:
@@ -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),
|
||||
|
||||
@@ -128,7 +128,7 @@ function timezone_transitions_get(
|
||||
DateTimeZone $object, int $timestampBegin = PHP_INT_MIN, int $timestampEnd = PHP_INT_MAX): array|false {}
|
||||
|
||||
/**
|
||||
* @return array<string, float|string>
|
||||
* @return array<string, float|string>|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<string, int|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<string, int|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<string, float|string>|false
|
||||
* @tentative-return-type
|
||||
* @alias timezone_location_get
|
||||
*/
|
||||
public function getLocation(): array|false {}
|
||||
|
||||
/**
|
||||
* @return array<string, array>
|
||||
* @tentative-return-type
|
||||
* @alias timezone_abbreviations_list
|
||||
*/
|
||||
public static function listAbbreviations(): array {}
|
||||
|
||||
/**
|
||||
* @return array<int, string>
|
||||
* @tentative-return-type
|
||||
* @alias timezone_identifiers_list
|
||||
*/
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user