From 0e2f5488f20f3b9f3fb499b47a9f64b12b2ef8c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1t=C3=A9=20Kocsis?= Date: Tue, 21 Jul 2020 09:58:04 +0200 Subject: [PATCH] Improve argument types and names in ext/ctype --- ext/ctype/ctype.stub.php | 33 ++++++++++++++++++++++----------- ext/ctype/ctype_arginfo.h | 4 ++-- 2 files changed, 24 insertions(+), 13 deletions(-) diff --git a/ext/ctype/ctype.stub.php b/ext/ctype/ctype.stub.php index 4f78ed85fbddb..50b9519d07c62 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 $input */ +function ctype_alnum(mixed $input): bool {} -function ctype_alpha($text): bool {} +/** @param string|int $input */ +function ctype_alpha(mixed $input): bool {} -function ctype_cntrl($text): bool {} +/** @param string|int $input */ +function ctype_cntrl(mixed $input): bool {} -function ctype_digit($text): bool {} +/** @param string|int $input */ +function ctype_digit(mixed $input): bool {} -function ctype_lower($text): bool {} +/** @param string|int $input */ +function ctype_lower(mixed $input): bool {} -function ctype_graph($text): bool {} +/** @param string|int $input */ +function ctype_graph(mixed $input): bool {} -function ctype_print($text): bool {} +/** @param string|int $input */ +function ctype_print(mixed $input): bool {} -function ctype_punct($text): bool {} +/** @param string|int $input */ +function ctype_punct(mixed $input): bool {} -function ctype_space($text): bool {} +/** @param string|int $input */ +function ctype_space(mixed $input): bool {} -function ctype_upper($text): bool {} +/** @param string|int $input */ +function ctype_upper(mixed $input): bool {} -function ctype_xdigit($text): bool {} +/** @param string|int $input */ +function ctype_xdigit(mixed $input): bool {} diff --git a/ext/ctype/ctype_arginfo.h b/ext/ctype/ctype_arginfo.h index 4ee065b03bfd1..fbba07b03f56c 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: 203a0af69b71e3255a1a4c0b371d9ac704d74f71 */ 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, input, IS_MIXED, 0) ZEND_END_ARG_INFO() #define arginfo_ctype_alpha arginfo_ctype_alnum