PHP_CodeSniffer
PHP_CodeSniffer copied to clipboard
Generic.WhiteSpace.SpaceIndent.IncorrectExact false positive when condition or cycle are placed inside the block
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]