Skip to content

Commit 69a5c56

Browse files
committed
Improve argument types and names in ext/ctype
Closes GH-5878
1 parent e079e75 commit 69a5c56

File tree

2 files changed

+24
-13
lines changed

2 files changed

+24
-13
lines changed

ext/ctype/ctype.stub.php

Lines changed: 22 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,35 @@
22

33
/** @generate-function-entries */
44

5-
function ctype_alnum($text): bool {}
5+
/** @param string|int $text */
6+
function ctype_alnum(mixed $text): bool {}
67

7-
function ctype_alpha($text): bool {}
8+
/** @param string|int $text */
9+
function ctype_alpha(mixed $text): bool {}
810

9-
function ctype_cntrl($text): bool {}
11+
/** @param string|int $text */
12+
function ctype_cntrl(mixed $text): bool {}
1013

11-
function ctype_digit($text): bool {}
14+
/** @param string|int $text */
15+
function ctype_digit(mixed $text): bool {}
1216

13-
function ctype_lower($text): bool {}
17+
/** @param string|int $text */
18+
function ctype_lower(mixed $text): bool {}
1419

15-
function ctype_graph($text): bool {}
20+
/** @param string|int $text */
21+
function ctype_graph(mixed $text): bool {}
1622

17-
function ctype_print($text): bool {}
23+
/** @param string|int $text */
24+
function ctype_print(mixed $text): bool {}
1825

19-
function ctype_punct($text): bool {}
26+
/** @param string|int $text */
27+
function ctype_punct(mixed $text): bool {}
2028

21-
function ctype_space($text): bool {}
29+
/** @param string|int $text */
30+
function ctype_space(mixed $text): bool {}
2231

23-
function ctype_upper($text): bool {}
32+
/** @param string|int $text */
33+
function ctype_upper(mixed $text): bool {}
2434

25-
function ctype_xdigit($text): bool {}
35+
/** @param string|int $text */
36+
function ctype_xdigit(mixed $text): bool {}

ext/ctype/ctype_arginfo.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
/* This is a generated file, edit the .stub.php file instead.
2-
* Stub hash: a5de84e1cb6919e7dfc69a42b7f05967ebca24c3 */
2+
* Stub hash: 5263184b90f82d53c6da4388c79b76a8c17977e9 */
33

44
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_ctype_alnum, 0, 1, _IS_BOOL, 0)
5-
ZEND_ARG_INFO(0, text)
5+
ZEND_ARG_TYPE_INFO(0, text, IS_MIXED, 0)
66
ZEND_END_ARG_INFO()
77

88
#define arginfo_ctype_alpha arginfo_ctype_alnum

0 commit comments

Comments
 (0)