Skip to content

Commit 68195bd

Browse files
committed
Update ext/spl parameter names
Closes GH-6284.
1 parent c96d884 commit 68195bd

Some content is hidden

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

48 files changed

+186
-184
lines changed

Zend/zend_interfaces.stub.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ interface Serializable
5252
public function serialize();
5353

5454
/** @return void */
55-
public function unserialize(string $serialized);
55+
public function unserialize(string $data);
5656
}
5757

5858
interface Countable

Zend/zend_interfaces_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: 1aa9ef81a738328a334176d37683646b60b2f6fa */
2+
* Stub hash: 29a5ed0b859b0732074c81cf9d26047a6eb9059a */
33

44
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_IteratorAggregate_getIterator, 0, 0, 0)
55
ZEND_END_ARG_INFO()
@@ -30,7 +30,7 @@ ZEND_END_ARG_INFO()
3030
#define arginfo_class_Serializable_serialize arginfo_class_IteratorAggregate_getIterator
3131

3232
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Serializable_unserialize, 0, 0, 1)
33-
ZEND_ARG_TYPE_INFO(0, serialized, IS_STRING, 0)
33+
ZEND_ARG_TYPE_INFO(0, data, IS_STRING, 0)
3434
ZEND_END_ARG_INFO()
3535

3636
#define arginfo_class_Countable_count arginfo_class_IteratorAggregate_getIterator

ext/hash/hash.stub.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,5 +52,5 @@ private function __construct() {}
5252

5353
public function __serialize(): array {}
5454

55-
public function __unserialize(array $serialized): void {}
55+
public function __unserialize(array $data): void {}
5656
}

ext/hash/hash_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: 5298231334ab85edd67ae46c33b7e6cffb2ecc53 */
2+
* Stub hash: 9352e0ac98e2ac53dc15d5024f9ef0c8092c4e9c */
33

44
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_hash, 0, 2, MAY_BE_STRING|MAY_BE_FALSE)
55
ZEND_ARG_TYPE_INFO(0, algo, IS_STRING, 0)
@@ -121,7 +121,7 @@ ZEND_END_ARG_INFO()
121121
#define arginfo_class_HashContext___serialize arginfo_hash_algos
122122

123123
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_HashContext___unserialize, 0, 1, IS_VOID, 0)
124-
ZEND_ARG_TYPE_INFO(0, serialized, IS_ARRAY, 0)
124+
ZEND_ARG_TYPE_INFO(0, data, IS_ARRAY, 0)
125125
ZEND_END_ARG_INFO()
126126

127127

ext/phar/tests/phar_oo_006.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ unlink(__DIR__ . '/files/phar_oo_006.phar.php');
4040
__halt_compiler();
4141
?>
4242
--EXPECTF--
43-
SplFileInfo::setFileClass(): Argument #1 ($class_name) must be a class name derived from SplFileObject, SplFileInfo given
43+
SplFileInfo::setFileClass(): Argument #1 ($class) must be a class name derived from SplFileObject, SplFileInfo given
4444
MyFile::__construct(phar://%s/a.php)
4545
a.php
4646
MyFile::__construct(phar://%s/b/c.php)

ext/spl/php_spl.stub.php

100755100644
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,18 +19,18 @@ function spl_autoload_extensions(?string $file_extensions = null): string {}
1919

2020
function spl_autoload_functions(): array {}
2121

22-
function spl_autoload_register(?callable $autoload_function = null, bool $throw = true, bool $prepend = false): bool {}
22+
function spl_autoload_register(?callable $callback = null, bool $throw = true, bool $prepend = false): bool {}
2323

24-
function spl_autoload_unregister(callable $autoload_function): bool {}
24+
function spl_autoload_unregister(callable $callback): bool {}
2525

2626
function spl_classes(): array {}
2727

2828
function spl_object_hash(object $object): string {}
2929

3030
function spl_object_id(object $object): int {}
3131

32-
function iterator_apply(Traversable $iterator, callable $function, ?array $args = null): int {}
32+
function iterator_apply(Traversable $iterator, callable $callback, ?array $args = null): int {}
3333

3434
function iterator_count(Traversable $iterator): int {}
3535

36-
function iterator_to_array(Traversable $iterator, bool $use_keys = true): array {}
36+
function iterator_to_array(Traversable $iterator, bool $preserve_keys = true): array {}

ext/spl/php_spl_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: 31d99979ea43e3d0d2592495977465976ca67760 */
2+
* Stub hash: 920cc4fca334f59316fc4276277958c9738afb3e */
33

44
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_class_implements, 0, 1, MAY_BE_ARRAY|MAY_BE_FALSE)
55
ZEND_ARG_INFO(0, object_or_class)
@@ -27,13 +27,13 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_spl_autoload_functions, 0, 0, IS
2727
ZEND_END_ARG_INFO()
2828

2929
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_spl_autoload_register, 0, 0, _IS_BOOL, 0)
30-
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, autoload_function, IS_CALLABLE, 1, "null")
30+
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, callback, IS_CALLABLE, 1, "null")
3131
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, throw, _IS_BOOL, 0, "true")
3232
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, prepend, _IS_BOOL, 0, "false")
3333
ZEND_END_ARG_INFO()
3434

3535
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_spl_autoload_unregister, 0, 1, _IS_BOOL, 0)
36-
ZEND_ARG_TYPE_INFO(0, autoload_function, IS_CALLABLE, 0)
36+
ZEND_ARG_TYPE_INFO(0, callback, IS_CALLABLE, 0)
3737
ZEND_END_ARG_INFO()
3838

3939
#define arginfo_spl_classes arginfo_spl_autoload_functions
@@ -48,7 +48,7 @@ ZEND_END_ARG_INFO()
4848

4949
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_iterator_apply, 0, 2, IS_LONG, 0)
5050
ZEND_ARG_OBJ_INFO(0, iterator, Traversable, 0)
51-
ZEND_ARG_TYPE_INFO(0, function, IS_CALLABLE, 0)
51+
ZEND_ARG_TYPE_INFO(0, callback, IS_CALLABLE, 0)
5252
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, args, IS_ARRAY, 1, "null")
5353
ZEND_END_ARG_INFO()
5454

@@ -58,7 +58,7 @@ ZEND_END_ARG_INFO()
5858

5959
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_iterator_to_array, 0, 1, IS_ARRAY, 0)
6060
ZEND_ARG_OBJ_INFO(0, iterator, Traversable, 0)
61-
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, use_keys, _IS_BOOL, 0, "true")
61+
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, preserve_keys, _IS_BOOL, 0, "true")
6262
ZEND_END_ARG_INFO()
6363

6464

ext/spl/spl_array.stub.php

100755100644
Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -4,31 +4,31 @@
44

55
class ArrayObject implements IteratorAggregate, ArrayAccess, Serializable, Countable
66
{
7-
public function __construct(array|object $input = [], int $flags = 0, string $iterator_class = ArrayIterator::class) {}
7+
public function __construct(array|object $array = [], int $flags = 0, string $iteratorClass = ArrayIterator::class) {}
88

99
/**
10-
* @param string|int $index
10+
* @param string|int $key
1111
* @return bool
1212
*/
13-
public function offsetExists($index) {}
13+
public function offsetExists($key) {}
1414

1515
/**
16-
* @param string|int $index
16+
* @param string|int $key
1717
* @return mixed
1818
*/
19-
public function offsetGet($index) {}
19+
public function offsetGet($key) {}
2020

2121
/**
22-
* @param string|int $index
22+
* @param string|int $key
2323
* @return void
2424
*/
25-
public function offsetSet($index, mixed $value) {}
25+
public function offsetSet($key, mixed $value) {}
2626

2727
/**
28-
* @param string|int $index
28+
* @param string|int $key
2929
* @return void
3030
*/
31-
public function offsetUnset($index) {}
31+
public function offsetUnset($key) {}
3232

3333
/** @return void */
3434
public function append(mixed $value) {}
@@ -46,16 +46,16 @@ public function getFlags() {}
4646
public function setFlags(int $flags) {}
4747

4848
/** @return bool */
49-
public function asort(int $sort_flags = SORT_REGULAR) {}
49+
public function asort(int $flags = SORT_REGULAR) {}
5050

5151
/** @return bool */
52-
public function ksort(int $sort_flags = SORT_REGULAR) {}
52+
public function ksort(int $flags = SORT_REGULAR) {}
5353

5454
/** @return bool */
55-
public function uasort(callable $cmp_function) {}
55+
public function uasort(callable $callback) {}
5656

5757
/** @return bool */
58-
public function uksort(callable $cmp_function) {}
58+
public function uksort(callable $callback) {}
5959

6060
/** @return bool */
6161
public function natsort() {}
@@ -64,7 +64,7 @@ public function natsort() {}
6464
public function natcasesort() {}
6565

6666
/** @return void */
67-
public function unserialize(string $serialized) {}
67+
public function unserialize(string $data) {}
6868

6969
/** @return string */
7070
public function serialize() {}
@@ -79,7 +79,7 @@ public function __unserialize(array $data) {}
7979
public function getIterator() {}
8080

8181
/** @return array|null */
82-
public function exchangeArray(array|object $input) {}
82+
public function exchangeArray(array|object $array) {}
8383

8484
/** @return void */
8585
public function setIteratorClass(string $iteratorClass) {}
@@ -96,32 +96,32 @@ class ArrayIterator implements SeekableIterator, ArrayAccess, Serializable, Coun
9696
public function __construct(array|object $array = [], int $flags = 0) {}
9797

9898
/**
99-
* @param string|int $index
99+
* @param string|int $key
100100
* @return bool
101101
* @implementation-alias ArrayObject::offsetExists
102102
*/
103-
public function offsetExists($index) {}
103+
public function offsetExists($key) {}
104104

105105
/**
106-
* @param string|int $index
106+
* @param string|int $key
107107
* @return mixed
108108
* @implementation-alias ArrayObject::offsetGet
109109
*/
110-
public function offsetGet($index) {}
110+
public function offsetGet($key) {}
111111

112112
/**
113-
* @param string|int $index
113+
* @param string|int $key
114114
* @return void
115115
* @implementation-alias ArrayObject::offsetSet
116116
*/
117-
public function offsetSet($index, mixed $value) {}
117+
public function offsetSet($key, mixed $value) {}
118118

119119
/**
120-
* @param string|int $index
120+
* @param string|int $key
121121
* @return void
122122
* @implementation-alias ArrayObject::offsetUnset
123123
*/
124-
public function offsetUnset($index) {}
124+
public function offsetUnset($key) {}
125125

126126
/**
127127
* @return void
@@ -157,25 +157,25 @@ public function setFlags(int $flags) {}
157157
* @return bool
158158
* @implementation-alias ArrayObject::asort
159159
*/
160-
public function asort(int $sort_flags = SORT_REGULAR) {}
160+
public function asort(int $flags = SORT_REGULAR) {}
161161

162162
/**
163163
* @return bool
164164
* @implementation-alias ArrayObject::ksort
165165
*/
166-
public function ksort(int $sort_flags = SORT_REGULAR) {}
166+
public function ksort(int $flags = SORT_REGULAR) {}
167167

168168
/**
169169
* @return bool
170170
* @implementation-alias ArrayObject::uasort
171171
*/
172-
public function uasort(callable $cmp_function) {}
172+
public function uasort(callable $callback) {}
173173

174174
/**
175175
* @return bool
176176
* @implementation-alias ArrayObject::uksort
177177
*/
178-
public function uksort(callable $cmp_function) {}
178+
public function uksort(callable $callback) {}
179179

180180
/**
181181
* @return bool
@@ -193,7 +193,7 @@ public function natcasesort() {}
193193
* @return void
194194
* @implementation-alias ArrayObject::unserialize
195195
*/
196-
public function unserialize(string $serialized) {}
196+
public function unserialize(string $data) {}
197197

198198
/**
199199
* @return string
@@ -229,7 +229,7 @@ public function next() {}
229229
public function valid() {}
230230

231231
/** @return void */
232-
public function seek(int $position) {}
232+
public function seek(int $offset) {}
233233

234234
/**
235235
* @return array

ext/spl/spl_array_arginfo.h

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

44
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ArrayObject___construct, 0, 0, 0)
5-
ZEND_ARG_TYPE_MASK(0, input, MAY_BE_ARRAY|MAY_BE_OBJECT, "[]")
5+
ZEND_ARG_TYPE_MASK(0, array, MAY_BE_ARRAY|MAY_BE_OBJECT, "[]")
66
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "0")
7-
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, iterator_class, IS_STRING, 0, "ArrayIterator::class")
7+
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, iteratorClass, IS_STRING, 0, "ArrayIterator::class")
88
ZEND_END_ARG_INFO()
99

1010
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ArrayObject_offsetExists, 0, 0, 1)
11-
ZEND_ARG_INFO(0, index)
11+
ZEND_ARG_INFO(0, key)
1212
ZEND_END_ARG_INFO()
1313

1414
#define arginfo_class_ArrayObject_offsetGet arginfo_class_ArrayObject_offsetExists
1515

1616
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ArrayObject_offsetSet, 0, 0, 2)
17-
ZEND_ARG_INFO(0, index)
17+
ZEND_ARG_INFO(0, key)
1818
ZEND_ARG_TYPE_INFO(0, value, IS_MIXED, 0)
1919
ZEND_END_ARG_INFO()
2020

@@ -36,13 +36,13 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ArrayObject_setFlags, 0, 0, 1)
3636
ZEND_END_ARG_INFO()
3737

3838
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ArrayObject_asort, 0, 0, 0)
39-
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, sort_flags, IS_LONG, 0, "SORT_REGULAR")
39+
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "SORT_REGULAR")
4040
ZEND_END_ARG_INFO()
4141

4242
#define arginfo_class_ArrayObject_ksort arginfo_class_ArrayObject_asort
4343

4444
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ArrayObject_uasort, 0, 0, 1)
45-
ZEND_ARG_TYPE_INFO(0, cmp_function, IS_CALLABLE, 0)
45+
ZEND_ARG_TYPE_INFO(0, callback, IS_CALLABLE, 0)
4646
ZEND_END_ARG_INFO()
4747

4848
#define arginfo_class_ArrayObject_uksort arginfo_class_ArrayObject_uasort
@@ -52,7 +52,7 @@ ZEND_END_ARG_INFO()
5252
#define arginfo_class_ArrayObject_natcasesort arginfo_class_ArrayObject_getArrayCopy
5353

5454
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ArrayObject_unserialize, 0, 0, 1)
55-
ZEND_ARG_TYPE_INFO(0, serialized, IS_STRING, 0)
55+
ZEND_ARG_TYPE_INFO(0, data, IS_STRING, 0)
5656
ZEND_END_ARG_INFO()
5757

5858
#define arginfo_class_ArrayObject_serialize arginfo_class_ArrayObject_getArrayCopy
@@ -66,7 +66,7 @@ ZEND_END_ARG_INFO()
6666
#define arginfo_class_ArrayObject_getIterator arginfo_class_ArrayObject_getArrayCopy
6767

6868
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ArrayObject_exchangeArray, 0, 0, 1)
69-
ZEND_ARG_TYPE_MASK(0, input, MAY_BE_ARRAY|MAY_BE_OBJECT, NULL)
69+
ZEND_ARG_TYPE_MASK(0, array, MAY_BE_ARRAY|MAY_BE_OBJECT, NULL)
7070
ZEND_END_ARG_INFO()
7171

7272
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ArrayObject_setIteratorClass, 0, 0, 1)
@@ -131,7 +131,7 @@ ZEND_END_ARG_INFO()
131131
#define arginfo_class_ArrayIterator_valid arginfo_class_ArrayObject_getArrayCopy
132132

133133
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ArrayIterator_seek, 0, 0, 1)
134-
ZEND_ARG_TYPE_INFO(0, position, IS_LONG, 0)
134+
ZEND_ARG_TYPE_INFO(0, offset, IS_LONG, 0)
135135
ZEND_END_ARG_INFO()
136136

137137
#define arginfo_class_ArrayIterator___debugInfo arginfo_class_ArrayObject_getArrayCopy

0 commit comments

Comments
 (0)