Skip to content

Commit a0e9f42

Browse files
committed
Improve parameter names in ext/intl
1 parent 5039999 commit a0e9f42

File tree

53 files changed

+515
-499
lines changed

Some content is hidden

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

53 files changed

+515
-499
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: 4 additions & 4 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() {}
@@ -64,14 +64,14 @@ public function preceding(int $offset) {}
6464
public function previous() {}
6565

6666
/** @return bool|null */
67-
public function setText(string $text) {}
67+
public function setText(string $string) {}
6868

6969
public function getIterator(): Iterator {}
7070
}
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: 5 additions & 5 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: 8186ab7941a15d0fb234480013516e97ab40038c */
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
@@ -53,15 +53,15 @@ ZEND_END_ARG_INFO()
5353
#define arginfo_class_IntlBreakIterator_previous arginfo_class_IntlBreakIterator_createCodePointInstance
5454

5555
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_IntlBreakIterator_setText, 0, 0, 1)
56-
ZEND_ARG_TYPE_INFO(0, text, IS_STRING, 0)
56+
ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0)
5757
ZEND_END_ARG_INFO()
5858

5959
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_class_IntlBreakIterator_getIterator, 0, 0, Iterator, 0)
6060
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: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ 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
@@ -23,13 +23,13 @@ public function equals(IntlCalendar $calendar) {}
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
@@ -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 $common) {}
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
@@ -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
288288
* @param int $dayOfMonth
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, $dayOfMonth = 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 $timestamo) {}
300300

301301
/**
302302
* @return float

ext/intl/calendar/calendar_arginfo.h

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
/* This is a generated file, edit the .stub.php file instead.
2-
* Stub hash: 0ac7a1d4e011518fc956fb05624b45b061fa9710 */
2+
* Stub hash: e590f7aa754414e0bf201a90379b2662e8f86db9 */
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

@@ -14,13 +14,13 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_IntlCalendar_equals, 0, 0, 1)
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, common, _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,27 +123,27 @@ 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)
148148
ZEND_ARG_INFO(0, dayOfMonth)
149149
ZEND_ARG_INFO(0, hour)
@@ -152,7 +152,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_IntlGregorianCalendar___construct, 0, 0, 0)
152152
ZEND_END_ARG_INFO()
153153

154154
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_IntlGregorianCalendar_setGregorianChange, 0, 0, 1)
155-
ZEND_ARG_TYPE_INFO(0, change, IS_DOUBLE, 0)
155+
ZEND_ARG_TYPE_INFO(0, timestamo, IS_DOUBLE, 0)
156156
ZEND_END_ARG_INFO()
157157

158158
#define arginfo_class_IntlGregorianCalendar_getGregorianChange arginfo_class_IntlCalendar___construct

0 commit comments

Comments
 (0)