diff options
| author | Máté Kocsis <kocsismate@woohoolabs.com> | 2019-11-16 18:40:06 +0100 |
|---|---|---|
| committer | Christoph M. Becker <cmbecker69@gmx.de> | 2019-11-18 12:44:38 +0100 |
| commit | c58b12334df9980b8832925c3920b992593eb09a (patch) | |
| tree | 5fdd2cf1e7b767562d6502e86c272ce9d989b82b /ext/intl | |
| parent | 100552d4b5f648e0d6548c5e7393f8d7c10f0acb (diff) | |
| download | php-git-c58b12334df9980b8832925c3920b992593eb09a.tar.gz | |
Add union return types with one class
Diffstat (limited to 'ext/intl')
| -rw-r--r-- | ext/intl/timezone/timezone.stub.php | 6 | ||||
| -rw-r--r-- | ext/intl/timezone/timezone_arginfo.h | 8 |
2 files changed, 8 insertions, 6 deletions
diff --git a/ext/intl/timezone/timezone.stub.php b/ext/intl/timezone/timezone.stub.php index 2a9a2be39c..06f5424aa4 100644 --- a/ext/intl/timezone/timezone.stub.php +++ b/ext/intl/timezone/timezone.stub.php @@ -93,8 +93,7 @@ function intltz_create_enumeration($countryOrRawOffset = null) {} function intltz_create_time_zone(string $zoneId): ?IntlTimeZone {} -/** @return IntlIterator|false */ -function intltz_create_time_zone_id_enumeration(int $zoneType, ?string $region = null, ?int $rawOffset = null) {} +function intltz_create_time_zone_id_enumeration(int $zoneType, ?string $region = null, ?int $rawOffset = null): IntlIterator|false {} function intltz_from_date_time_zone(DateTimeZone $zone): ?IntlTimeZone {} @@ -132,7 +131,6 @@ function intltz_get_id_for_windows_id(string $timezone, string $region = UNKNOWN function intltz_has_same_rules(IntlTimeZone $tz, IntlTimeZone $otherTimeZone): bool {} -/** @return DateTimeZone|false */ -function intltz_to_date_time_zone(IntlTimeZone $tz) {} +function intltz_to_date_time_zone(IntlTimeZone $tz): DateTimeZone|false {} function intltz_use_daylight_time(IntlTimeZone $tz): bool {} diff --git a/ext/intl/timezone/timezone_arginfo.h b/ext/intl/timezone/timezone_arginfo.h index 72a3c964c6..8cf82ef56a 100644 --- a/ext/intl/timezone/timezone_arginfo.h +++ b/ext/intl/timezone/timezone_arginfo.h @@ -100,7 +100,11 @@ ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_intltz_create_time_zone, 0, 1, In ZEND_ARG_TYPE_INFO(0, zoneId, IS_STRING, 0) ZEND_END_ARG_INFO() -#define arginfo_intltz_create_time_zone_id_enumeration arginfo_class_IntlTimeZone_createTimeZoneIDEnumeration +ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_intltz_create_time_zone_id_enumeration, 0, 1, IntlIterator, MAY_BE_FALSE) + ZEND_ARG_TYPE_INFO(0, zoneType, IS_LONG, 0) + ZEND_ARG_TYPE_INFO(0, region, IS_STRING, 1) + ZEND_ARG_TYPE_INFO(0, rawOffset, IS_LONG, 1) +ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_intltz_from_date_time_zone, 0, 1, IntlTimeZone, 1) ZEND_ARG_OBJ_INFO(0, zone, DateTimeZone, 0) @@ -174,7 +178,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_intltz_has_same_rules, 0, 2, _IS ZEND_ARG_OBJ_INFO(0, otherTimeZone, IntlTimeZone, 0) ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_INFO_EX(arginfo_intltz_to_date_time_zone, 0, 0, 1) +ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_intltz_to_date_time_zone, 0, 1, DateTimeZone, MAY_BE_FALSE) ZEND_ARG_OBJ_INFO(0, tz, IntlTimeZone, 0) ZEND_END_ARG_INFO() |
