Skip to content

Improve argument types and names in ext/ctype #5878

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 22 additions & 11 deletions ext/ctype/ctype.stub.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 {}
4 changes: 2 additions & 2 deletions ext/ctype/ctype_arginfo.h
Original file line number Diff line number Diff line change
@@ -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
Expand Down