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 support for is_file and family #6788

Open
villfa opened this issue Mar 10, 2022 · 0 comments · May be fixed by phpstan/phpstan-src#1993
Open

Improve support for is_file and family #6788

villfa opened this issue Mar 10, 2022 · 0 comments · May be fixed by phpstan/phpstan-src#1993

Comments

@villfa
Copy link
Contributor

villfa commented Mar 10, 2022

Feature request

Correct me if I'm wrong but I think the functions that expect a valid path (file_exists, is_readable, ...) always return false when an empty string is provided ( https://3v4l.org/TcecN ).
So when those functions return true we can say that the argument is a non-empty string.

If my assumption is right it could help with situations like this:
https://phpstan.org/r/e9812010-b816-4a57-8fb1-036c6a6b177e

Did PHPStan help you today? Did it make you happy in any way?

PHPStan is great! Thanks for your efforts!

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