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

Useless coalesce operator should be reported #2504

Closed
enumag opened this issue Oct 12, 2019 · 3 comments
Closed

Useless coalesce operator should be reported #2504

enumag opened this issue Oct 12, 2019 · 3 comments

Comments

@enumag
Copy link
Contributor

enumag commented Oct 12, 2019

https://phpstan.org/r/9c90d830-736e-4588-b425-8c97481fa4a8

Left side of the ?? operator is never null meaning the operator is useless here. I consider this to be the same type of error as an "always true condition".

@BackEndTea
Copy link
Contributor

This may be a duplicate of #2371

@ondrejmirtes
Copy link
Member

Implemented in: phpstan/phpstan-src#36

@lock
Copy link

lock bot commented Apr 2, 2020

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.

@lock lock bot locked as resolved and limited conversation to collaborators Apr 2, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants