diff options
author | Máté Kocsis <kocsismate@woohoolabs.com> | 2020-08-07 16:48:39 +0200 |
---|---|---|
committer | Máté Kocsis <kocsismate@woohoolabs.com> | 2020-08-07 16:48:45 +0200 |
commit | 046cc5e4c213b836546689d5bdc8925f057c24b5 (patch) | |
tree | 2fc60163e4d8a588203483ad3094d339fe246799 /ext/intl | |
parent | 7b9f37c3893a9a1c942a04a09c9e6b172c4af80b (diff) | |
download | php-git-046cc5e4c213b836546689d5bdc8925f057c24b5.tar.gz |
Add another round of missing parameter types to stubs
Closes GH-5950
Diffstat (limited to 'ext/intl')
-rw-r--r-- | ext/intl/calendar/calendar.stub.php | 10 | ||||
-rw-r--r-- | ext/intl/calendar/calendar_arginfo.h | 4 | ||||
-rw-r--r-- | ext/intl/collator/collator.stub.php | 2 | ||||
-rw-r--r-- | ext/intl/collator/collator_arginfo.h | 9 | ||||
-rw-r--r-- | ext/intl/converter/converter.stub.php | 10 | ||||
-rw-r--r-- | ext/intl/converter/converter_arginfo.h | 2 | ||||
-rw-r--r-- | ext/intl/dateformat/dateformat.stub.php | 2 | ||||
-rw-r--r-- | ext/intl/dateformat/dateformat_arginfo.h | 2 | ||||
-rw-r--r-- | ext/intl/formatter/formatter.stub.php | 3 | ||||
-rw-r--r-- | ext/intl/formatter/formatter_arginfo.h | 2 | ||||
-rw-r--r-- | ext/intl/php_intl.stub.php | 13 | ||||
-rw-r--r-- | ext/intl/php_intl_arginfo.h | 2 | ||||
-rw-r--r-- | ext/intl/spoofchecker/spoofchecker.stub.php | 10 | ||||
-rw-r--r-- | ext/intl/spoofchecker/spoofchecker_arginfo.h | 2 | ||||
-rw-r--r-- | ext/intl/timezone/timezone.stub.php | 3 | ||||
-rw-r--r-- | ext/intl/timezone/timezone_arginfo.h | 2 | ||||
-rw-r--r-- | ext/intl/uchar/uchar.stub.php | 2 | ||||
-rw-r--r-- | ext/intl/uchar/uchar_arginfo.h | 4 |
18 files changed, 60 insertions, 24 deletions
diff --git a/ext/intl/calendar/calendar.stub.php b/ext/intl/calendar/calendar.stub.php index d3a7958ee9..bc09ae70a3 100644 --- a/ext/intl/calendar/calendar.stub.php +++ b/ext/intl/calendar/calendar.stub.php @@ -235,7 +235,7 @@ class IntlCalendar * @return bool * @alias intlcal_set */ - public function set(int $year, int $month, int $dayOfMonth = UNKNOWN, $hour = UNKNOWN, int $minute = UNKNOWN, int $second = UNKNOWN) {} + public function set(int $year, int $month, int $dayOfMonth = UNKNOWN, int $hour = UNKNOWN, int $minute = UNKNOWN, int $second = UNKNOWN) {} /** * @return bool @@ -283,6 +283,14 @@ class IntlCalendar class IntlGregorianCalendar extends IntlCalendar { + /** + * @param DateTimeZone|IntlTimeZone|string|int|null $timeZoneOrYear + * @param string|int|null $localeOrMonth + * @param int $dayOfMonth + * @param int $hour + * @param int $minute + * @param int $second + */ public function __construct($timeZoneOrYear = UNKNOWN, $localeOrMonth = UNKNOWN, $dayOfMonth = UNKNOWN, $hour = UNKNOWN, $minute = UNKNOWN, $second = UNKNOWN) {} /** diff --git a/ext/intl/calendar/calendar_arginfo.h b/ext/intl/calendar/calendar_arginfo.h index 47ea9200fe..99626bd19e 100644 --- a/ext/intl/calendar/calendar_arginfo.h +++ b/ext/intl/calendar/calendar_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: 8b8a98d5035880031ac42fda5e58bde54c1d85fc */ + * Stub hash: 3facb6bdce18efae3d6b9594d1fcddfb220dd54d */ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_IntlCalendar___construct, 0, 0, 0) ZEND_END_ARG_INFO() @@ -115,7 +115,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_IntlCalendar_set, 0, 0, 2) ZEND_ARG_TYPE_INFO(0, year, IS_LONG, 0) ZEND_ARG_TYPE_INFO(0, month, IS_LONG, 0) ZEND_ARG_TYPE_INFO(0, dayOfMonth, IS_LONG, 0) - ZEND_ARG_INFO(0, hour) + ZEND_ARG_TYPE_INFO(0, hour, IS_LONG, 0) ZEND_ARG_TYPE_INFO(0, minute, IS_LONG, 0) ZEND_ARG_TYPE_INFO(0, second, IS_LONG, 0) ZEND_END_ARG_INFO() diff --git a/ext/intl/collator/collator.stub.php b/ext/intl/collator/collator.stub.php index 6e8c61c21a..68a7da192f 100644 --- a/ext/intl/collator/collator.stub.php +++ b/ext/intl/collator/collator.stub.php @@ -22,7 +22,7 @@ class Collator * @return bool * @alias collator_sort */ - public function sort(array &$arr, $sort_flag = Collator::SORT_REGULAR) {} + public function sort(array &$arr, int $sort_flag = Collator::SORT_REGULAR) {} /** * @return bool diff --git a/ext/intl/collator/collator_arginfo.h b/ext/intl/collator/collator_arginfo.h index 7d045b35a8..f0fd448077 100644 --- a/ext/intl/collator/collator_arginfo.h +++ b/ext/intl/collator/collator_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: 95fee5001472494653e6a83467c3c0079ea70728 */ + * Stub hash: 4cb1470cf2566c9d947be638c7d14a14a10290dd */ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Collator___construct, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, locale, IS_STRING, 0) @@ -14,17 +14,14 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Collator_sort, 0, 0, 1) ZEND_ARG_TYPE_INFO(1, arr, IS_ARRAY, 0) - ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, sort_flag, "Collator::SORT_REGULAR") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, sort_flag, IS_LONG, 0, "Collator::SORT_REGULAR") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Collator_sortWithSortKeys, 0, 0, 1) ZEND_ARG_TYPE_INFO(1, arr, IS_ARRAY, 0) ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Collator_asort, 0, 0, 1) - ZEND_ARG_TYPE_INFO(1, arr, IS_ARRAY, 0) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, sort_flag, IS_LONG, 0, "Collator::SORT_REGULAR") -ZEND_END_ARG_INFO() +#define arginfo_class_Collator_asort arginfo_class_Collator_sort ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Collator_getAttribute, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, attr, IS_LONG, 0) diff --git a/ext/intl/converter/converter.stub.php b/ext/intl/converter/converter.stub.php index fd6aa175b0..f888a78b03 100644 --- a/ext/intl/converter/converter.stub.php +++ b/ext/intl/converter/converter.stub.php @@ -9,7 +9,10 @@ class UConverter /** @return string|false */ public function convert(string $str, bool $reverse = false) {} - /** @return string|null */ + /** + * @param int $error + * @return string|null + */ public function fromUCallback(int $reason, array $source, int $codePoint, &$error) {} /** @return array|false|null */ @@ -54,7 +57,10 @@ class UConverter /** @return bool */ public function setSubstChars(string $chars) {} - /** @return string|null */ + /** + * @param int $error + * @return string|null + */ public function toUCallback(int $reason, string $source, string $codeUnits, &$error) {} /** @return string|false */ diff --git a/ext/intl/converter/converter_arginfo.h b/ext/intl/converter/converter_arginfo.h index 5a72ad68ee..513d8e4525 100644 --- a/ext/intl/converter/converter_arginfo.h +++ b/ext/intl/converter/converter_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: 3c63c9077f864e122292eef8655489549de9277a */ + * Stub hash: 9eef3fe293c07ab77f4c8b6d8d53a3798f8a9865 */ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_UConverter___construct, 0, 0, 0) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, destination_encoding, IS_STRING, 1, "null") diff --git a/ext/intl/dateformat/dateformat.stub.php b/ext/intl/dateformat/dateformat.stub.php index e86c8c93ad..cdb5aedb03 100644 --- a/ext/intl/dateformat/dateformat.stub.php +++ b/ext/intl/dateformat/dateformat.stub.php @@ -114,12 +114,14 @@ class IntlDateFormatter public static function formatObject($object, $format = null, ?string $locale = null) {} /** + * @param int $position * @return int|float|false * @alias datefmt_parse */ public function parse(string $value, &$position = null) {} /** + * @param int $position * @return array|false * @alias datefmt_localtime */ diff --git a/ext/intl/dateformat/dateformat_arginfo.h b/ext/intl/dateformat/dateformat_arginfo.h index 0dadfd9dd0..ae128d8bf9 100644 --- a/ext/intl/dateformat/dateformat_arginfo.h +++ b/ext/intl/dateformat/dateformat_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: 86faf2e51b67db2801ce691d4d24bfdae5feb6fc */ + * Stub hash: e98080c0b9107da6a2bf3ce99929554eb9a3c70e */ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_IntlDateFormatter___construct, 0, 0, 3) ZEND_ARG_TYPE_INFO(0, locale, IS_STRING, 1) diff --git a/ext/intl/formatter/formatter.stub.php b/ext/intl/formatter/formatter.stub.php index 2d5dc11966..4608c1917d 100644 --- a/ext/intl/formatter/formatter.stub.php +++ b/ext/intl/formatter/formatter.stub.php @@ -19,6 +19,7 @@ class NumberFormatter public function format(int|float $value, int $type = NumberFormatter::TYPE_DEFAULT) {} /** + * @param int $position * @return int|float|false * @alias numfmt_parse */ @@ -31,6 +32,8 @@ class NumberFormatter public function formatCurrency(float $value, string $currency) {} /** + * @param string $currency + * @param int $position * @return float|false * @alias numfmt_parse_currency */ diff --git a/ext/intl/formatter/formatter_arginfo.h b/ext/intl/formatter/formatter_arginfo.h index 051a98f941..ffc4eb5018 100644 --- a/ext/intl/formatter/formatter_arginfo.h +++ b/ext/intl/formatter/formatter_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: 3ff6f141d025bccb37ff597089f00bcc72462627 */ + * Stub hash: 041569278b83b65f67fb4848d00d5423e6728165 */ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_NumberFormatter___construct, 0, 0, 2) ZEND_ARG_TYPE_INFO(0, locale, IS_STRING, 0) diff --git a/ext/intl/php_intl.stub.php b/ext/intl/php_intl.stub.php index bbb09d03c8..8cb198e7d6 100644 --- a/ext/intl/php_intl.stub.php +++ b/ext/intl/php_intl.stub.php @@ -98,7 +98,14 @@ function intlcal_get_error_code(IntlCalendar $calendar): int|false {} function intlcal_get_error_message(IntlCalendar $calendar): string|false {} -/** @param IntlTimeZone|DateTimeZone|string|null $timeZone */ +/** + * @param DateTimeZone|IntlTimeZone|string|int|null $timeZoneOrYear + * @param string|int|null $localeOrMonth + * @param int $dayOfMonth + * @param int $hour + * @param int $minute + * @param int $second + */ function intlgregcal_create_instance($timeZoneOrYear = UNKNOWN, $localeOrMonth = UNKNOWN, $dayOfMonth = UNKNOWN, $hour = UNKNOWN, $minute = UNKNOWN, $second = UNKNOWN): ?IntlGregorianCalendar {} function intlgregcal_set_gregorian_change(IntlGregorianCalendar $calendar, float $change): bool {} @@ -393,6 +400,10 @@ function intltz_get_gmt(): IntlTimeZone {} function intltz_get_id(IntlTimeZone $tz): string|false {} +/** + * @param int $rawOffset + * @param int $dstOffset + */ function intltz_get_offset(IntlTimeZone $tz, float $date, bool $local, &$rawOffset, &$dstOffset): bool {} function intltz_get_raw_offset(IntlTimeZone $tz): int {} diff --git a/ext/intl/php_intl_arginfo.h b/ext/intl/php_intl_arginfo.h index 93dcec79e3..d66163c1b5 100644 --- a/ext/intl/php_intl_arginfo.h +++ b/ext/intl/php_intl_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: ef46b927a82d0bdecea9438ff6ba0000b73b3b56 */ + * Stub hash: 57c63e06f2c6cf6c58a63081f19fe3e6d6901e88 */ ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_intlcal_create_instance, 0, 0, IntlCalendar, 1) ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, timeZone, "null") diff --git a/ext/intl/spoofchecker/spoofchecker.stub.php b/ext/intl/spoofchecker/spoofchecker.stub.php index 82b749b1eb..b3f7159979 100644 --- a/ext/intl/spoofchecker/spoofchecker.stub.php +++ b/ext/intl/spoofchecker/spoofchecker.stub.php @@ -6,10 +6,16 @@ class Spoofchecker { public function __construct() {} - /** @return bool */ + /** + * @param int $error + * @return bool + */ public function isSuspicious(string $text, &$error = null) {} - /** @return bool */ + /** + * @param int $error + * @return bool + */ public function areConfusable(string $s1, string $s2, &$error = null) {} /** @return void */ diff --git a/ext/intl/spoofchecker/spoofchecker_arginfo.h b/ext/intl/spoofchecker/spoofchecker_arginfo.h index 26ca66080a..925195fcda 100644 --- a/ext/intl/spoofchecker/spoofchecker_arginfo.h +++ b/ext/intl/spoofchecker/spoofchecker_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: dbcdb94753d19921594c48a735d6bd9194b02996 */ + * Stub hash: 5f4ea7ab66c1748a8de076fca4b62a7d0a235598 */ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Spoofchecker___construct, 0, 0, 0) ZEND_END_ARG_INFO() diff --git a/ext/intl/timezone/timezone.stub.php b/ext/intl/timezone/timezone.stub.php index e470ee8440..5e6208bb73 100644 --- a/ext/intl/timezone/timezone.stub.php +++ b/ext/intl/timezone/timezone.stub.php @@ -44,6 +44,7 @@ class IntlTimeZone public static function fromDateTimeZone(DateTimeZone $zone) {} /** + * @param bool $isSystemID * @return string|false * @alias intltz_get_canonical_id */ @@ -92,6 +93,8 @@ class IntlTimeZone public function getID() {} /** + * @param int $rawOffset + * @param int $dstOffset * @return bool * @alias intltz_get_offset */ diff --git a/ext/intl/timezone/timezone_arginfo.h b/ext/intl/timezone/timezone_arginfo.h index 494c46391b..b21975eed4 100644 --- a/ext/intl/timezone/timezone_arginfo.h +++ b/ext/intl/timezone/timezone_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: df98b2edbdf806c52a9c165b52124b6b0de7acb2 */ + * Stub hash: 94e3c8228a0625a2c5825b0747fb1e5e08808b50 */ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_IntlTimeZone___construct, 0, 0, 0) ZEND_END_ARG_INFO() diff --git a/ext/intl/uchar/uchar.stub.php b/ext/intl/uchar/uchar.stub.php index a01552f8c9..6f793a6147 100644 --- a/ext/intl/uchar/uchar.stub.php +++ b/ext/intl/uchar/uchar.stub.php @@ -47,7 +47,7 @@ class IntlChar public static function foldCase(int|string $codepoint, int $options = IntlChar::FOLD_CASE_DEFAULT) {} /** @return int */ - public static function forDigit(int $digit, $radix = 10) {} + public static function forDigit(int $digit, int $radix = 10) {} #if U_ICU_VERSION_MAJOR_NUM >= 52 /** @return int|string|null */ diff --git a/ext/intl/uchar/uchar_arginfo.h b/ext/intl/uchar/uchar_arginfo.h index 6f0175b803..3ea897c189 100644 --- a/ext/intl/uchar/uchar_arginfo.h +++ b/ext/intl/uchar/uchar_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: 2f9658fe9c23180244786ed48a5ca542b7ed95ea */ + * Stub hash: 61f9c0a6c5048d25e070379f2f98fa10f8ce25ee */ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_IntlChar_hasBinaryProperty, 0, 0, 2) ZEND_ARG_TYPE_MASK(0, codepoint, MAY_BE_LONG|MAY_BE_STRING, NULL) @@ -53,7 +53,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_IntlChar_forDigit, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, digit, IS_LONG, 0) - ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, radix, "10") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, radix, IS_LONG, 0, "10") ZEND_END_ARG_INFO() #if U_ICU_VERSION_MAJOR_NUM >= 52 |