Skip to content

Commit 186612e

Browse files
committed
Improve parameter names in ext/intl
Closes GH-6309
1 parent eef994d commit 186612e

File tree

54 files changed

+526
-512
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+526
-512
lines changed

ext/date/php_date.stub.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ function date_interval_create_from_date_string(string $datetime): DateInterval|f
9898

9999
function date_interval_format(DateInterval $object, string $format): string {}
100100

101-
function date_default_timezone_set(string $timezoneID): bool {}
101+
function date_default_timezone_set(string $timezoneId): bool {}
102102

103103
function date_default_timezone_get(): string {}
104104

ext/date/php_date_arginfo.h

Lines changed: 2 additions & 2 deletions
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: cb1532309655d85eb2644cdcfbf23063dfa1ddaf */
2+
* Stub hash: 561c6ad41ccedfc8b778d3b64323c7154dffcdb5 */
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)
@@ -203,7 +203,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_date_interval_format, 0, 2, IS_S
203203
ZEND_END_ARG_INFO()
204204

205205
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_date_default_timezone_set, 0, 1, _IS_BOOL, 0)
206-
ZEND_ARG_TYPE_INFO(0, timezoneID, IS_STRING, 0)
206+
ZEND_ARG_TYPE_INFO(0, timezoneId, IS_STRING, 0)
207207
ZEND_END_ARG_INFO()
208208

209209
#define arginfo_date_default_timezone_get arginfo_timezone_version_get

ext/intl/breakiterator/breakiterator.stub.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,10 @@ public function getErrorCode() {}
4040
public function getErrorMessage() {}
4141

4242
/** @return string */
43-
public function getLocale(int $locale_type) {}
43+
public function getLocale(int $type) {}
4444

4545
/** @return IntlPartsIterator */
46-
public function getPartsIterator(string $key_type = IntlPartsIterator::KEY_SEQUENTIAL) {}
46+
public function getPartsIterator(string $type = IntlPartsIterator::KEY_SEQUENTIAL) {}
4747

4848
/** @return string|null */
4949
public function getText() {}
@@ -71,7 +71,7 @@ public function getIterator(): Iterator {}
7171

7272
class IntlRuleBasedBreakIterator extends IntlBreakIterator
7373
{
74-
public function __construct(string $rules, bool $areCompiled = false) {}
74+
public function __construct(string $rules, bool $compiled = false) {}
7575

7676
/** @return string|false */
7777
public function getBinaryRules() {}

ext/intl/breakiterator/breakiterator_arginfo.h

Lines changed: 4 additions & 4 deletions
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: 5eeedbbb7d07b0063d7bc19842b863a2c6d6898b */
2+
* Stub hash: 6a121ed9817667820f05677a772781d6b788796b */
33

44
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_IntlBreakIterator_createCharacterInstance, 0, 0, 0)
55
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, locale, IS_STRING, 1, "null")
@@ -31,11 +31,11 @@ ZEND_END_ARG_INFO()
3131
#define arginfo_class_IntlBreakIterator_getErrorMessage arginfo_class_IntlBreakIterator_createCodePointInstance
3232

3333
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_IntlBreakIterator_getLocale, 0, 0, 1)
34-
ZEND_ARG_TYPE_INFO(0, locale_type, IS_LONG, 0)
34+
ZEND_ARG_TYPE_INFO(0, type, IS_LONG, 0)
3535
ZEND_END_ARG_INFO()
3636

3737
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_IntlBreakIterator_getPartsIterator, 0, 0, 0)
38-
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, key_type, IS_STRING, 0, "IntlPartsIterator::KEY_SEQUENTIAL")
38+
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, type, IS_STRING, 0, "IntlPartsIterator::KEY_SEQUENTIAL")
3939
ZEND_END_ARG_INFO()
4040

4141
#define arginfo_class_IntlBreakIterator_getText arginfo_class_IntlBreakIterator_createCodePointInstance
@@ -61,7 +61,7 @@ ZEND_END_ARG_INFO()
6161

6262
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_IntlRuleBasedBreakIterator___construct, 0, 0, 1)
6363
ZEND_ARG_TYPE_INFO(0, rules, IS_STRING, 0)
64-
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, areCompiled, _IS_BOOL, 0, "false")
64+
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, compiled, _IS_BOOL, 0, "false")
6565
ZEND_END_ARG_INFO()
6666

6767
#define arginfo_class_IntlRuleBasedBreakIterator_getBinaryRules arginfo_class_IntlBreakIterator_createCodePointInstance

ext/intl/calendar/calendar.stub.php

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -7,41 +7,41 @@ class IntlCalendar
77
private function __construct() {}
88

99
/**
10-
* @param IntlTimeZone|DateTimeZone|string|null $timeZone
10+
* @param IntlTimeZone|DateTimeZone|string|null $timezone
1111
* @return IntlCalendar|IntlGregorianCalendar|null
1212
* @alias intlcal_create_instance
1313
*/
14-
public static function createInstance($timeZone = null, ?string $locale = null) {}
14+
public static function createInstance($timezone = null, ?string $locale = null) {}
1515

1616
/**
1717
* @return bool
1818
* @alias intlcal_equals
1919
*/
20-
public function equals(IntlCalendar $calendar) {}
20+
public function equals(IntlCalendar $other) {}
2121

2222
/**
2323
* @return int
2424
* @alias intlcal_field_difference
2525
*/
26-
public function fieldDifference(float $when, int $field) {}
26+
public function fieldDifference(float $timestamp, int $field) {}
2727

2828
/**
2929
* @return bool
3030
* @alias intlcal_add
3131
*/
32-
public function add(int $field, int $amount) {}
32+
public function add(int $field, int $value) {}
3333

3434
/**
3535
* @return bool
3636
* @alias intlcal_after
3737
*/
38-
public function after(IntlCalendar $calendar) {}
38+
public function after(IntlCalendar $other) {}
3939

4040
/**
4141
* @return bool
4242
* @alias intlcal_before
4343
*/
44-
public function before(IntlCalendar $calendar) {}
44+
public function before(IntlCalendar $other) {}
4545

4646
/**
4747
* @return bool
@@ -53,7 +53,7 @@ public function clear(?int $field = null) {}
5353
* @return IntlCalendar|null
5454
* @alias intlcal_from_date_time
5555
*/
56-
public static function fromDateTime(DateTime|string $dateTime, ?string $locale = null) {}
56+
public static function fromDateTime(DateTime|string $datetime, ?string $locale = null) {}
5757

5858
/**
5959
* @return int
@@ -113,7 +113,7 @@ public function getGreatestMinimum(int $field) {}
113113
* @return IntlIterator|false
114114
* @alias intlcal_get_keyword_values_for_locale
115115
*/
116-
public static function getKeywordValuesForLocale(string $key, string $locale, bool $commonlyUsed) {}
116+
public static function getKeywordValuesForLocale(string $keyword, string $locale, bool $onlyCommon) {}
117117

118118
/**
119119
* @return int
@@ -125,7 +125,7 @@ public function getLeastMaximum(int $field) {}
125125
* @return string
126126
* @alias intlcal_get_locale
127127
*/
128-
public function getLocale(int $localeType) {}
128+
public function getLocale(int $type) {}
129129

130130
/**
131131
* @return int
@@ -143,7 +143,7 @@ public function getMinimalDaysInFirstWeek() {}
143143
* @return bool
144144
* @alias intlcal_set_minimal_days_in_first_week
145145
*/
146-
public function setMinimalDaysInFirstWeek(int $numberOfDays) {}
146+
public function setMinimalDaysInFirstWeek(int $days) {}
147147

148148
/**
149149
* @return int
@@ -203,7 +203,7 @@ public function inDaylightTime() {}
203203
* @return bool
204204
* @alias intlcal_is_equivalent_to
205205
*/
206-
public function isEquivalentTo(IntlCalendar $calendar) {}
206+
public function isEquivalentTo(IntlCalendar $other) {}
207207

208208
/**
209209
* @return bool
@@ -215,7 +215,7 @@ public function isLenient() {}
215215
* @return bool
216216
* @alias intlcal_is_weekend
217217
*/
218-
public function isWeekend(?float $date = null) {}
218+
public function isWeekend(?float $timestamp = null) {}
219219

220220
/**
221221
* @param int|bool $amountOrUpOrDown
@@ -246,32 +246,32 @@ public function setFirstDayOfWeek(int $dayOfWeek) {}
246246
* @return bool
247247
* @alias intlcal_set_lenient
248248
*/
249-
public function setLenient(bool $isLenient) {}
249+
public function setLenient(bool $lenient) {}
250250

251251
/**
252252
* @return bool
253253
* @alias intlcal_set_repeated_wall_time_option
254254
*/
255-
public function setRepeatedWallTimeOption(int $wallTimeOption) {}
255+
public function setRepeatedWallTimeOption(int $option) {}
256256

257257
/**
258258
* @return bool
259259
* @alias intlcal_set_skipped_wall_time_option
260260
*/
261-
public function setSkippedWallTimeOption(int $wallTimeOption) {}
261+
public function setSkippedWallTimeOption(int $option) {}
262262

263263
/**
264264
* @return bool
265265
* @alias intlcal_set_time
266266
*/
267-
public function setTime(float $date) {}
267+
public function setTime(float $timestamp) {}
268268

269269
/**
270-
* @param IntlTimeZone|DateTimeZone|string|null $timeZone
270+
* @param IntlTimeZone|DateTimeZone|string|null $timezone
271271
* @return bool
272272
* @alias intlcal_set_time_zone
273273
*/
274-
public function setTimeZone($timeZone) {}
274+
public function setTimeZone($timezone) {}
275275

276276
/**
277277
* @return DateTime|false
@@ -283,20 +283,20 @@ public function toDateTime() {}
283283
class IntlGregorianCalendar extends IntlCalendar
284284
{
285285
/**
286-
* @param DateTimeZone|IntlTimeZone|string|int|null $timeZoneOrYear
286+
* @param DateTimeZone|IntlTimeZone|string|int|null $timezoneOrYear
287287
* @param string|int|null $localeOrMonth
288-
* @param int $dayOfMonth
288+
* @param int $day
289289
* @param int $hour
290290
* @param int $minute
291291
* @param int $second
292292
*/
293-
public function __construct($timeZoneOrYear = UNKNOWN, $localeOrMonth = UNKNOWN, $dayOfMonth = UNKNOWN, $hour = UNKNOWN, $minute = UNKNOWN, $second = UNKNOWN) {}
293+
public function __construct($timezoneOrYear = UNKNOWN, $localeOrMonth = UNKNOWN, $day = UNKNOWN, $hour = UNKNOWN, $minute = UNKNOWN, $second = UNKNOWN) {}
294294

295295
/**
296296
* @return bool
297297
* @alias intlgregcal_set_gregorian_change
298298
*/
299-
public function setGregorianChange(float $change) {}
299+
public function setGregorianChange(float $timestamp) {}
300300

301301
/**
302302
* @return float

ext/intl/calendar/calendar_arginfo.h

Lines changed: 18 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
11
/* This is a generated file, edit the .stub.php file instead.
2-
* Stub hash: 0ac7a1d4e011518fc956fb05624b45b061fa9710 */
2+
* Stub hash: cac6d4040481ab7de4775315079b1d28a44cbcac */
33

44
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_IntlCalendar___construct, 0, 0, 0)
55
ZEND_END_ARG_INFO()
66

77
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_IntlCalendar_createInstance, 0, 0, 0)
8-
ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, timeZone, "null")
8+
ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, timezone, "null")
99
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, locale, IS_STRING, 1, "null")
1010
ZEND_END_ARG_INFO()
1111

1212
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_IntlCalendar_equals, 0, 0, 1)
13-
ZEND_ARG_OBJ_INFO(0, calendar, IntlCalendar, 0)
13+
ZEND_ARG_OBJ_INFO(0, other, IntlCalendar, 0)
1414
ZEND_END_ARG_INFO()
1515

1616
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_IntlCalendar_fieldDifference, 0, 0, 2)
17-
ZEND_ARG_TYPE_INFO(0, when, IS_DOUBLE, 0)
17+
ZEND_ARG_TYPE_INFO(0, timestamp, IS_DOUBLE, 0)
1818
ZEND_ARG_TYPE_INFO(0, field, IS_LONG, 0)
1919
ZEND_END_ARG_INFO()
2020

2121
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_IntlCalendar_add, 0, 0, 2)
2222
ZEND_ARG_TYPE_INFO(0, field, IS_LONG, 0)
23-
ZEND_ARG_TYPE_INFO(0, amount, IS_LONG, 0)
23+
ZEND_ARG_TYPE_INFO(0, value, IS_LONG, 0)
2424
ZEND_END_ARG_INFO()
2525

2626
#define arginfo_class_IntlCalendar_after arginfo_class_IntlCalendar_equals
@@ -32,7 +32,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_IntlCalendar_clear, 0, 0, 0)
3232
ZEND_END_ARG_INFO()
3333

3434
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_IntlCalendar_fromDateTime, 0, 0, 1)
35-
ZEND_ARG_OBJ_TYPE_MASK(0, dateTime, DateTime, MAY_BE_STRING, NULL)
35+
ZEND_ARG_OBJ_TYPE_MASK(0, datetime, DateTime, MAY_BE_STRING, NULL)
3636
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, locale, IS_STRING, 1, "null")
3737
ZEND_END_ARG_INFO()
3838

@@ -59,23 +59,23 @@ ZEND_END_ARG_INFO()
5959
#define arginfo_class_IntlCalendar_getGreatestMinimum arginfo_class_IntlCalendar_get
6060

6161
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_IntlCalendar_getKeywordValuesForLocale, 0, 0, 3)
62-
ZEND_ARG_TYPE_INFO(0, key, IS_STRING, 0)
62+
ZEND_ARG_TYPE_INFO(0, keyword, IS_STRING, 0)
6363
ZEND_ARG_TYPE_INFO(0, locale, IS_STRING, 0)
64-
ZEND_ARG_TYPE_INFO(0, commonlyUsed, _IS_BOOL, 0)
64+
ZEND_ARG_TYPE_INFO(0, onlyCommon, _IS_BOOL, 0)
6565
ZEND_END_ARG_INFO()
6666

6767
#define arginfo_class_IntlCalendar_getLeastMaximum arginfo_class_IntlCalendar_get
6868

6969
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_IntlCalendar_getLocale, 0, 0, 1)
70-
ZEND_ARG_TYPE_INFO(0, localeType, IS_LONG, 0)
70+
ZEND_ARG_TYPE_INFO(0, type, IS_LONG, 0)
7171
ZEND_END_ARG_INFO()
7272

7373
#define arginfo_class_IntlCalendar_getMaximum arginfo_class_IntlCalendar_get
7474

7575
#define arginfo_class_IntlCalendar_getMinimalDaysInFirstWeek arginfo_class_IntlCalendar___construct
7676

7777
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_IntlCalendar_setMinimalDaysInFirstWeek, 0, 0, 1)
78-
ZEND_ARG_TYPE_INFO(0, numberOfDays, IS_LONG, 0)
78+
ZEND_ARG_TYPE_INFO(0, days, IS_LONG, 0)
7979
ZEND_END_ARG_INFO()
8080

8181
#define arginfo_class_IntlCalendar_getMinimum arginfo_class_IntlCalendar_get
@@ -101,7 +101,7 @@ ZEND_END_ARG_INFO()
101101
#define arginfo_class_IntlCalendar_isLenient arginfo_class_IntlCalendar___construct
102102

103103
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_IntlCalendar_isWeekend, 0, 0, 0)
104-
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, date, IS_DOUBLE, 1, "null")
104+
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, timestamp, IS_DOUBLE, 1, "null")
105105
ZEND_END_ARG_INFO()
106106

107107
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_IntlCalendar_roll, 0, 0, 2)
@@ -123,37 +123,35 @@ ZEND_END_ARG_INFO()
123123
#define arginfo_class_IntlCalendar_setFirstDayOfWeek arginfo_class_IntlCalendar_getDayOfWeekType
124124

125125
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_IntlCalendar_setLenient, 0, 0, 1)
126-
ZEND_ARG_TYPE_INFO(0, isLenient, _IS_BOOL, 0)
126+
ZEND_ARG_TYPE_INFO(0, lenient, _IS_BOOL, 0)
127127
ZEND_END_ARG_INFO()
128128

129129
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_IntlCalendar_setRepeatedWallTimeOption, 0, 0, 1)
130-
ZEND_ARG_TYPE_INFO(0, wallTimeOption, IS_LONG, 0)
130+
ZEND_ARG_TYPE_INFO(0, option, IS_LONG, 0)
131131
ZEND_END_ARG_INFO()
132132

133133
#define arginfo_class_IntlCalendar_setSkippedWallTimeOption arginfo_class_IntlCalendar_setRepeatedWallTimeOption
134134

135135
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_IntlCalendar_setTime, 0, 0, 1)
136-
ZEND_ARG_TYPE_INFO(0, date, IS_DOUBLE, 0)
136+
ZEND_ARG_TYPE_INFO(0, timestamp, IS_DOUBLE, 0)
137137
ZEND_END_ARG_INFO()
138138

139139
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_IntlCalendar_setTimeZone, 0, 0, 1)
140-
ZEND_ARG_INFO(0, timeZone)
140+
ZEND_ARG_INFO(0, timezone)
141141
ZEND_END_ARG_INFO()
142142

143143
#define arginfo_class_IntlCalendar_toDateTime arginfo_class_IntlCalendar___construct
144144

145145
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_IntlGregorianCalendar___construct, 0, 0, 0)
146-
ZEND_ARG_INFO(0, timeZoneOrYear)
146+
ZEND_ARG_INFO(0, timezoneOrYear)
147147
ZEND_ARG_INFO(0, localeOrMonth)
148-
ZEND_ARG_INFO(0, dayOfMonth)
148+
ZEND_ARG_INFO(0, day)
149149
ZEND_ARG_INFO(0, hour)
150150
ZEND_ARG_INFO(0, minute)
151151
ZEND_ARG_INFO(0, second)
152152
ZEND_END_ARG_INFO()
153153

154-
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_IntlGregorianCalendar_setGregorianChange, 0, 0, 1)
155-
ZEND_ARG_TYPE_INFO(0, change, IS_DOUBLE, 0)
156-
ZEND_END_ARG_INFO()
154+
#define arginfo_class_IntlGregorianCalendar_setGregorianChange arginfo_class_IntlCalendar_setTime
157155

158156
#define arginfo_class_IntlGregorianCalendar_getGregorianChange arginfo_class_IntlCalendar___construct
159157

0 commit comments

Comments
 (0)