Skip to content

Commit e195992

Browse files
committed
Reflection param renames amendment
Closes GH-6230
1 parent 0ec6452 commit e195992

File tree

3 files changed

+9
-11
lines changed

3 files changed

+9
-11
lines changed

ext/reflection/php_reflection.stub.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ public function getDeclaringClass() {}
194194
public function getPrototype() {}
195195

196196
/** @return void */
197-
public function setAccessible(bool $isAccessible) {}
197+
public function setAccessible(bool $accessible) {}
198198
}
199199

200200
class ReflectionClass implements Reflector
@@ -364,7 +364,7 @@ public function getAttributes(?string $name = null, int $flags = 0): array {}
364364

365365
class ReflectionObject extends ReflectionClass
366366
{
367-
public function __construct(object $argument) {}
367+
public function __construct(object $object) {}
368368
}
369369

370370
class ReflectionProperty implements Reflector
@@ -415,7 +415,7 @@ public function getDeclaringClass() {}
415415
public function getDocComment() {}
416416

417417
/** @return void */
418-
public function setAccessible(bool $isAccessible) {}
418+
public function setAccessible(bool $accessible) {}
419419

420420
/** @return ReflectionType|null */
421421
public function getType() {}
@@ -475,7 +475,7 @@ class ReflectionParameter implements Reflector
475475
final private function __clone() {}
476476

477477
/** @param string|array|object $function */
478-
public function __construct($function, int|string $parameter) {}
478+
public function __construct($function, int|string $param) {}
479479

480480
public function __toString(): string {}
481481

ext/reflection/php_reflection_arginfo.h

Lines changed: 4 additions & 6 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: 35e17de0cdf6c11a315f6d10fd711492d1da567c */
2+
* Stub hash: f5f4cfeab0e81c2b51bf11dde7b7d40fc87d9cbc */
33

44
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Reflection_getModifierNames, 0, 0, 1)
55
ZEND_ARG_TYPE_INFO(0, modifiers, IS_LONG, 0)
@@ -144,7 +144,7 @@ ZEND_END_ARG_INFO()
144144
#define arginfo_class_ReflectionMethod_getPrototype arginfo_class_ReflectionFunctionAbstract___clone
145145

146146
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ReflectionMethod_setAccessible, 0, 0, 1)
147-
ZEND_ARG_TYPE_INFO(0, isAccessible, _IS_BOOL, 0)
147+
ZEND_ARG_TYPE_INFO(0, accessible, _IS_BOOL, 0)
148148
ZEND_END_ARG_INFO()
149149

150150
#define arginfo_class_ReflectionClass___clone arginfo_class_ReflectionFunctionAbstract___clone
@@ -277,9 +277,7 @@ ZEND_END_ARG_INFO()
277277

278278
#define arginfo_class_ReflectionClass_getAttributes arginfo_class_ReflectionFunctionAbstract_getAttributes
279279

280-
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ReflectionObject___construct, 0, 0, 1)
281-
ZEND_ARG_TYPE_INFO(0, argument, IS_OBJECT, 0)
282-
ZEND_END_ARG_INFO()
280+
#define arginfo_class_ReflectionObject___construct arginfo_class_ReflectionClass_isInstance
283281

284282
#define arginfo_class_ReflectionProperty___clone arginfo_class_ReflectionFunctionAbstract___clone
285283

@@ -363,7 +361,7 @@ ZEND_END_ARG_INFO()
363361

364362
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ReflectionParameter___construct, 0, 0, 2)
365363
ZEND_ARG_INFO(0, function)
366-
ZEND_ARG_TYPE_MASK(0, parameter, MAY_BE_LONG|MAY_BE_STRING, NULL)
364+
ZEND_ARG_TYPE_MASK(0, param, MAY_BE_LONG|MAY_BE_STRING, NULL)
367365
ZEND_END_ARG_INFO()
368366

369367
#define arginfo_class_ReflectionParameter___toString arginfo_class_ReflectionFunction___toString

ext/reflection/tests/parameters_001.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,4 @@ int(1)
3939
bool(false)
4040
bool(true)
4141
string(54) "The parameter specified by its name could not be found"
42-
string(95) "ReflectionParameter::__construct(): Argument #2 ($parameter) must be greater than or equal to 0"
42+
string(91) "ReflectionParameter::__construct(): Argument #2 ($param) must be greater than or equal to 0"

0 commit comments

Comments
 (0)