From: Máté Kocsis Date: Tue, 21 Jul 2020 07:58:04 +0000 (+0200) Subject: Improve argument types and names in ext/ctype X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=69a5c561d05c8074afe53b8d545d6a6205343aac;p=php Improve argument types and names in ext/ctype Closes GH-5878 --- diff --git a/ext/ctype/ctype.stub.php b/ext/ctype/ctype.stub.php index 4f78ed85fb..5ae356cc4f 100644 --- a/ext/ctype/ctype.stub.php +++ b/ext/ctype/ctype.stub.php @@ -2,24 +2,35 @@ /** @generate-function-entries */ -function ctype_alnum($text): bool {} +/** @param string|int $text */ +function ctype_alnum(mixed $text): bool {} -function ctype_alpha($text): bool {} +/** @param string|int $text */ +function ctype_alpha(mixed $text): bool {} -function ctype_cntrl($text): bool {} +/** @param string|int $text */ +function ctype_cntrl(mixed $text): bool {} -function ctype_digit($text): bool {} +/** @param string|int $text */ +function ctype_digit(mixed $text): bool {} -function ctype_lower($text): bool {} +/** @param string|int $text */ +function ctype_lower(mixed $text): bool {} -function ctype_graph($text): bool {} +/** @param string|int $text */ +function ctype_graph(mixed $text): bool {} -function ctype_print($text): bool {} +/** @param string|int $text */ +function ctype_print(mixed $text): bool {} -function ctype_punct($text): bool {} +/** @param string|int $text */ +function ctype_punct(mixed $text): bool {} -function ctype_space($text): bool {} +/** @param string|int $text */ +function ctype_space(mixed $text): bool {} -function ctype_upper($text): bool {} +/** @param string|int $text */ +function ctype_upper(mixed $text): bool {} -function ctype_xdigit($text): bool {} +/** @param string|int $text */ +function ctype_xdigit(mixed $text): bool {} diff --git a/ext/ctype/ctype_arginfo.h b/ext/ctype/ctype_arginfo.h index 4ee065b03b..72e4d7b35c 100644 --- a/ext/ctype/ctype_arginfo.h +++ b/ext/ctype/ctype_arginfo.h @@ -1,8 +1,8 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: a5de84e1cb6919e7dfc69a42b7f05967ebca24c3 */ + * Stub hash: 5263184b90f82d53c6da4388c79b76a8c17977e9 */ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_ctype_alnum, 0, 1, _IS_BOOL, 0) - ZEND_ARG_INFO(0, text) + ZEND_ARG_TYPE_INFO(0, text, IS_MIXED, 0) ZEND_END_ARG_INFO() #define arginfo_ctype_alpha arginfo_ctype_alnum