Skip to content

Commit 5e424d2

Browse files
committed
Fix a few ext/date return types
1 parent 93a88a1 commit 5e424d2

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

Zend/Optimizer/zend_func_infos.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ static const func_info_t func_infos[] = {
4747
F1("timezone_name_get", MAY_BE_STRING),
4848
F1("timezone_name_from_abbr", MAY_BE_STRING|MAY_BE_FALSE),
4949
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),
50-
F1("timezone_location_get", MAY_BE_ARRAY|MAY_BE_ARRAY_KEY_STRING|MAY_BE_ARRAY_OF_DOUBLE|MAY_BE_ARRAY_OF_STRING),
50+
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),
5151
F1("timezone_identifiers_list", MAY_BE_ARRAY|MAY_BE_ARRAY_KEY_LONG|MAY_BE_ARRAY_OF_STRING),
5252
F1("timezone_abbreviations_list", MAY_BE_ARRAY|MAY_BE_ARRAY_KEY_STRING|MAY_BE_ARRAY_OF_ARRAY),
5353
F1("timezone_version_get", MAY_BE_STRING),

ext/date/php_date.stub.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ function timezone_transitions_get(
128128
DateTimeZone $object, int $timestampBegin = PHP_INT_MIN, int $timestampEnd = PHP_INT_MAX): array|false {}
129129

130130
/**
131-
* @return array<string, float|string>
131+
* @return array<string, float|string>|false
132132
* @refcount 1
133133
*/
134134
function timezone_location_get(DateTimeZone $object): array|false {}
@@ -226,6 +226,7 @@ public static function createFromInterface(DateTimeInterface $object): DateTime
226226
public static function createFromFormat(string $format, string $datetime, ?DateTimeZone $timezone = null): DateTime|false {}
227227

228228
/**
229+
* @return array<string, int|array>|false
229230
* @tentative-return-type
230231
* @alias date_get_last_errors
231232
*/
@@ -327,6 +328,7 @@ public static function __set_state(array $array): DateTimeImmutable {}
327328
public static function createFromFormat(string $format, string $datetime, ?DateTimeZone $timezone = null): DateTimeImmutable|false {}
328329

329330
/**
331+
* @return array<string, int|array>|false
330332
* @tentative-return-type
331333
* @alias date_get_last_errors
332334
*/
@@ -415,18 +417,21 @@ public function getOffset(DateTimeInterface $datetime): int {}
415417
public function getTransitions(int $timestampBegin = PHP_INT_MIN, int $timestampEnd = PHP_INT_MAX): array|false {}
416418

417419
/**
420+
* @return array<string, float|string>|false
418421
* @tentative-return-type
419422
* @alias timezone_location_get
420423
*/
421424
public function getLocation(): array|false {}
422425

423426
/**
427+
* @return array<string, array>
424428
* @tentative-return-type
425429
* @alias timezone_abbreviations_list
426430
*/
427431
public static function listAbbreviations(): array {}
428432

429433
/**
434+
* @return array<int, string>
430435
* @tentative-return-type
431436
* @alias timezone_identifiers_list
432437
*/

ext/date/php_date_arginfo.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* This is a generated file, edit the .stub.php file instead.
2-
* Stub hash: 18e879f3036f0d9685dfe73e43c13ecdae2d93ee */
2+
* Stub hash: 0f3ef0e61bf6b00a4e33375282097b3dfa51da66 */
33

44
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_strtotime, 0, 1, MAY_BE_LONG|MAY_BE_FALSE)
55
ZEND_ARG_TYPE_INFO(0, datetime, IS_STRING, 0)

0 commit comments

Comments
 (0)