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

Call to function is_string with string will always evaluate to true #120

Open
emodric opened this issue Feb 18, 2021 · 2 comments
Open

Call to function is_string with string will always evaluate to true #120

emodric opened this issue Feb 18, 2021 · 2 comments

Comments

@emodric
Copy link

emodric commented Feb 18, 2021

Hi,

I have Treat PHPDoc types as certain option turned off, and the following piece of code fails:

https://phpstan.org/r/5dd76406-fbfc-4134-8158-c859505a05fc

Disabling checkAlwaysTrueCheckTypeFunctionCall option, actually removes the error message, but that doesn't seem correct to me.

If I configured PHPStan so that PHPDoc types are not certain, then by all reasoning, the code in question should be fine without disabling checkAlwaysTrueCheckTypeFunctionCall.

@emodric
Copy link
Author

emodric commented Feb 18, 2021

@VincentLanglet
Copy link
Contributor

@emodric @ondrejmirtes Both example seems outdated and fixed, so the issue might be closed.

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

No branches or pull requests

2 participants