Skip to content

UselessIfConditionWithReturn will remove comments #1040

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
gmponos opened this issue Jun 21, 2020 · 2 comments
Closed

UselessIfConditionWithReturn will remove comments #1040

gmponos opened this issue Jun 21, 2020 · 2 comments
Labels

Comments

@gmponos
Copy link
Contributor

gmponos commented Jun 21, 2020

Hi..

Can you check this: https://github.com/doctrine/coding-standard/pull/208/files#diff-b67fca0df7d43e41d2ac5ceeb7ae7679R30

I think it's the SlevomatCodingStandard.ControlStructures.UselessIfConditionWithReturn

It removes the comment and also makes it a short return. I believe the rule should be either configurable or just report errors in these cases.

@kukulich
Copy link
Contributor

Thank you for your report.

Fixed in de41b2a

@kukulich kukulich added the Bug label Jun 22, 2020
@github-actions
Copy link

This issue 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 Jul 24, 2020
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants