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

Better detection of unused variable #1633

Open
AlexKratky opened this issue Oct 10, 2023 · 1 comment
Open

Better detection of unused variable #1633

AlexKratky opened this issue Oct 10, 2023 · 1 comment
Labels

Comments

@AlexKratky
Copy link

It would be nice to have detection like phpstorm, because $bankAccount variable assigned on first line is never read, only redefined later on, thus its unused and the result of getBankAccount() should not be stored in variable.

image

@kukulich
Copy link
Contributor

I expect I will remove this sniff in future major version. It is job more for PHPStan/Psalm.

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

No branches or pull requests

2 participants