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

Closed
emodric opened this issue Feb 18, 2021 · 3 comments
Closed

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

emodric opened this issue Feb 18, 2021 · 3 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.

Copy link

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 20, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants