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

Improve return type precision of filter_input with invalid first args #2333

Merged

Conversation

herndlm
Copy link
Contributor

@herndlm herndlm commented Apr 7, 2023

This is essentially https://3v4l.org/vLIZK / makes the return type more precise when the first arg (type constant) is invalid.

In order to do that I had to refactor this thing again and move more into the helper. I added caching for supportedFilterInputTypes at the same time as the helper was also doing it for other similar props.

The idea is also to keep the return type correct in combination with #2271

@ondrejmirtes ondrejmirtes merged commit 0e7e1d2 into phpstan:1.10.x Apr 8, 2023
371 of 378 checks passed
@ondrejmirtes
Copy link
Member

Thank you!

@herndlm herndlm deleted the filter-input-invalid-precision branch April 8, 2023 06:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants