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

Conversation

kocsismate
Copy link
Member

Unfortunately, we can't use the string|int union type in ZPP since ctype functions rely on strict argument handling, so I added the mixed parameter type declaration, and the string|int PHPDoc type hint.

Additionally, I think the $input parameter name is better than $text in this context.

Copy link
Member

@nikic nikic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As mentioned in chat, I'd prefer keeping $text, though either is okay.

@php-pulls php-pulls closed this in 69a5c56 Jul 21, 2020
@kocsismate kocsismate deleted the argument-handling-ctype branch July 21, 2020 14:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants