]> granicus.if.org Git - php/commitdiff
Improve argument types and names in ext/ctype
authorMáté Kocsis <kocsismate@woohoolabs.com>
Tue, 21 Jul 2020 07:58:04 +0000 (09:58 +0200)
committerMáté Kocsis <kocsismate@woohoolabs.com>
Tue, 21 Jul 2020 14:40:47 +0000 (16:40 +0200)
Closes GH-5878

ext/ctype/ctype.stub.php
ext/ctype/ctype_arginfo.h

index 4f78ed85fbddb49588cee84a357a8dbeb99b8d50..5ae356cc4f2a6226c3a9e19d67bb70be537f5636 100644 (file)
@@ -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 {}
index 4ee065b03bfd143f2f9b6359e6a5785905d4bef3..72e4d7b35c5f0eef4887607a60fe2645803ce1ae 100644 (file)
@@ -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