Skip to content
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

Improved the type of the $mode parameter for the count() #3190

Merged
merged 3 commits into from
Jun 28, 2024

Conversation

kuma3
Copy link
Contributor

@kuma3 kuma3 commented Jun 27, 2024

From the manual for the count(): https://www.php.net/manual/en/function.count.php

the parameter $mode accepts COUNT_NORMAL (0) or COUNT_RECURSIVE (1). I have made the necessary adjustments and added tests accordingly.

@ondrejmirtes
Copy link
Member

Narrowing parameter types belongs to functionMap_bleedingEdge so that no userland code is broken in a minor release.

@kuma3
Copy link
Contributor Author

kuma3 commented Jun 27, 2024

OK. I will move the implementation to functionMap_bleedingEdge.

@ondrejmirtes ondrejmirtes merged commit 877ff0a into phpstan:1.11.x Jun 28, 2024
451 of 454 checks passed
@ondrejmirtes
Copy link
Member

Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants