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

Generic.WhiteSpace.SpaceIndent.IncorrectExact false positive when condition or cycle are placed inside the block #3524

Open
pincher2012 opened this issue Jan 3, 2022 · 0 comments

Comments

@pincher2012
Copy link

pincher2012 commented Jan 3, 2022

Describe the bug
Generic.WhiteSpace.SpaceIndent.IncorrectExact false positive when condition or cycle are placed inside the block

Code sample

{
    if (1 > 2) {
        $a = 1;
    }

}

Shows

--------------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
--------------------------------------------------------------------------------------
 3 | ERROR | [x] Line indented incorrectly; expected 0 spaces, found 4
 5 | ERROR | [x] Line indented incorrectly; expected 0 spaces, found 4
--------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------

Expected behavior
Sniff doesn't fire

Versions (please complete the following information):

  • PHPCS: [master]
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

1 participant