Skip to content

Commit ae4b6b5

Browse files
committed
fixup! Address code review comments
1 parent 74e9af6 commit ae4b6b5

File tree

5 files changed

+8
-13
lines changed

5 files changed

+8
-13
lines changed

Zend/zend_closures.stub.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,6 @@ public function bindTo(?object $newThis, $newScope = UNKNOWN): ?Closure {}
1717

1818
public function call(object $newThis, mixed ...$arguments): mixed {}
1919

20-
/**
21-
* callable is not a proper type due to bug #78770.
22-
* @param callable $callback
23-
*/
20+
/** @param callable $callback callable is not a proper type due to bug #78770. */
2421
public static function fromCallable($callback): Closure {}
2522
}

Zend/zend_closures_arginfo.h

Lines changed: 1 addition & 1 deletion
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: ed6150159a1c45891c2d148771c366fc3b1ef8f0 */
2+
* Stub hash: 62198e96940fe0e86fe89601015c837aa5390e92 */
33

44
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Closure___construct, 0, 0, 0)
55
ZEND_END_ARG_INFO()

ext/mbstring/mbstring.stub.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,6 @@ function mb_decode_mimeheader(string $string): string {}
7171

7272
function mb_convert_kana(string $str, string $option = "KV", ?string $encoding = null): string {}
7373

74-
/**
75-
* @param object|string|array $var
76-
* @param object|string|array $vars
77-
*/
7874
function mb_convert_variables(string $to, array|string $from, mixed &$var, mixed &...$vars): string|false {}
7975

8076
function mb_encode_numericentity(string $string, array $convmap, ?string $encoding = null, bool $is_hex = false): string {}

ext/mbstring/mbstring_arginfo.h

Lines changed: 1 addition & 1 deletion
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: 615e21b594825ea0d71065f7816e77969d1aff30 */
2+
* Stub hash: 5ad8a8cf20eeae59713d19135ecccbee243754eb */
33

44
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mb_language, 0, 0, MAY_BE_STRING|MAY_BE_BOOL)
55
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, language, IS_STRING, 1, "null")

ext/reflection/php_reflection.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3100,7 +3100,11 @@ ZEND_METHOD(ReflectionMethod, getClosure)
31003100

31013101
if (mptr->common.fn_flags & ZEND_ACC_STATIC) {
31023102
zend_create_fake_closure(return_value, mptr, mptr->common.scope, mptr->common.scope, NULL);
3103-
} else if (obj) {
3103+
} else {
3104+
if (!obj) {
3105+
zend_argument_value_error(1, "cannot be null for non-static methods");
3106+
}
3107+
31043108
if (!instanceof_function(Z_OBJCE_P(obj), mptr->common.scope)) {
31053109
_DO_THROW("Given object is not an instance of the class this method was declared in");
31063110
RETURN_THROWS();
@@ -3114,8 +3118,6 @@ ZEND_METHOD(ReflectionMethod, getClosure)
31143118
} else {
31153119
zend_create_fake_closure(return_value, mptr, mptr->common.scope, Z_OBJCE_P(obj), obj);
31163120
}
3117-
} else {
3118-
zend_argument_value_error(1, "cannot be null for non-static methods");
31193121
}
31203122
}
31213123
/* }}} */

0 commit comments

Comments
 (0)