diff options
author | Máté Kocsis <kocsismate@woohoolabs.com> | 2020-07-28 23:00:44 +0200 |
---|---|---|
committer | Máté Kocsis <kocsismate@woohoolabs.com> | 2020-07-30 14:26:45 +0200 |
commit | 0d330e1a022d536de8a679d11dc8ec6f9fd64be3 (patch) | |
tree | a4b93785096169cca4ba3bb9109040311b374944 /Zend | |
parent | 41de27ecc239e3a7de50446be297e288bb934505 (diff) | |
download | php-git-0d330e1a022d536de8a679d11dc8ec6f9fd64be3.tar.gz |
Add a few missing parameter types in stubs
Related to GH-5627
Diffstat (limited to 'Zend')
-rw-r--r-- | Zend/tests/argument_restriction_005.phpt | 2 | ||||
-rw-r--r-- | Zend/zend_builtin_functions.stub.php | 2 | ||||
-rw-r--r-- | Zend/zend_builtin_functions_arginfo.h | 4 | ||||
-rw-r--r-- | Zend/zend_closures.stub.php | 2 | ||||
-rw-r--r-- | Zend/zend_closures_arginfo.h | 2 | ||||
-rw-r--r-- | Zend/zend_interfaces.stub.php | 14 | ||||
-rw-r--r-- | Zend/zend_interfaces_arginfo.h | 8 |
7 files changed, 18 insertions, 16 deletions
diff --git a/Zend/tests/argument_restriction_005.phpt b/Zend/tests/argument_restriction_005.phpt index 0982ccde4a..dc15593013 100644 --- a/Zend/tests/argument_restriction_005.phpt +++ b/Zend/tests/argument_restriction_005.phpt @@ -8,4 +8,4 @@ class Sub implements ArrayAccess { } ?> --EXPECTF-- -Fatal error: Declaration of Sub::offsetSet() must be compatible with ArrayAccess::offsetSet($offset, $value) in %sargument_restriction_005.php on line %d +Fatal error: Declaration of Sub::offsetSet() must be compatible with ArrayAccess::offsetSet(mixed $offset, mixed $value) in %sargument_restriction_005.php on line %d diff --git a/Zend/zend_builtin_functions.stub.php b/Zend/zend_builtin_functions.stub.php index a9a33d9de1..5d5ebcde14 100644 --- a/Zend/zend_builtin_functions.stub.php +++ b/Zend/zend_builtin_functions.stub.php @@ -23,7 +23,7 @@ function strncasecmp(string $string1, string $string2, int $length): int {} function error_reporting(?int $error_level = null): int {} /** @param mixed $value */ -function define(string $constant_name, $value, $case_insensitive = false): bool {} +function define(string $constant_name, $value, bool $case_insensitive = false): bool {} function defined(string $constant_name): bool {} diff --git a/Zend/zend_builtin_functions_arginfo.h b/Zend/zend_builtin_functions_arginfo.h index 0e1a7c3879..4b551e3d59 100644 --- a/Zend/zend_builtin_functions_arginfo.h +++ b/Zend/zend_builtin_functions_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: d1ab4864c1159916b45c8f272a2a1d708b2dca65 */ + * Stub hash: 1f644f72600eddbbb01a4c3912a2c9c5fe12188e */ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_zend_version, 0, 0, IS_STRING, 0) ZEND_END_ARG_INFO() @@ -40,7 +40,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_define, 0, 2, _IS_BOOL, 0) ZEND_ARG_TYPE_INFO(0, constant_name, IS_STRING, 0) ZEND_ARG_INFO(0, value) - ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, case_insensitive, "false") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, case_insensitive, _IS_BOOL, 0, "false") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_defined, 0, 1, _IS_BOOL, 0) diff --git a/Zend/zend_closures.stub.php b/Zend/zend_closures.stub.php index 65f5128e64..bf71c1b624 100644 --- a/Zend/zend_closures.stub.php +++ b/Zend/zend_closures.stub.php @@ -17,6 +17,6 @@ final class Closure public function call(object $newThis, mixed ...$arguments): mixed {} - /** @param callable $callback Not a proper type annotation due to bug #78770 */ + /** @param callable $callback callable is not a proper type due to bug #78770. */ public static function fromCallable($callback): Closure {} } diff --git a/Zend/zend_closures_arginfo.h b/Zend/zend_closures_arginfo.h index 9e7e64708c..56d2faec80 100644 --- a/Zend/zend_closures_arginfo.h +++ b/Zend/zend_closures_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: 57771cb65a3193bd683be75efd04f7daff0f8585 */ + * Stub hash: 62198e96940fe0e86fe89601015c837aa5390e92 */ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Closure___construct, 0, 0, 0) ZEND_END_ARG_INFO() diff --git a/Zend/zend_interfaces.stub.php b/Zend/zend_interfaces.stub.php index e10a343d6e..bb94190f8a 100644 --- a/Zend/zend_interfaces.stub.php +++ b/Zend/zend_interfaces.stub.php @@ -31,17 +31,19 @@ interface Iterator extends Traversable interface ArrayAccess { /** @return bool */ - public function offsetExists($offset); + public function offsetExists(mixed $offset); - /* actually this should be return by ref but atm cannot be */ - /** @return mixed */ - public function offsetGet($offset); + /** + * Actually this should be return by ref but atm cannot be. + * @return mixed + */ + public function offsetGet(mixed $offset); /** @return void */ - public function offsetSet($offset, $value); + public function offsetSet(mixed $offset, mixed $value); /** @return void */ - public function offsetUnset($offset); + public function offsetUnset(mixed $offset); } interface Serializable diff --git a/Zend/zend_interfaces_arginfo.h b/Zend/zend_interfaces_arginfo.h index 0598a5cabd..4b9d30ecd6 100644 --- a/Zend/zend_interfaces_arginfo.h +++ b/Zend/zend_interfaces_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: c3b97b8a9c7522fc5b58e63fbf9cd6a801f4bbc2 */ + * Stub hash: 1aa9ef81a738328a334176d37683646b60b2f6fa */ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_IteratorAggregate_getIterator, 0, 0, 0) ZEND_END_ARG_INFO() @@ -15,14 +15,14 @@ ZEND_END_ARG_INFO() #define arginfo_class_Iterator_rewind arginfo_class_IteratorAggregate_getIterator ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ArrayAccess_offsetExists, 0, 0, 1) - ZEND_ARG_INFO(0, offset) + ZEND_ARG_TYPE_INFO(0, offset, IS_MIXED, 0) ZEND_END_ARG_INFO() #define arginfo_class_ArrayAccess_offsetGet arginfo_class_ArrayAccess_offsetExists ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ArrayAccess_offsetSet, 0, 0, 2) - ZEND_ARG_INFO(0, offset) - ZEND_ARG_INFO(0, value) + ZEND_ARG_TYPE_INFO(0, offset, IS_MIXED, 0) + ZEND_ARG_TYPE_INFO(0, value, IS_MIXED, 0) ZEND_END_ARG_INFO() #define arginfo_class_ArrayAccess_offsetUnset arginfo_class_ArrayAccess_offsetExists |