Open Chi-teck opened 1 year ago
I've tried to reproduce and I was able to reproduce, the required steps are:
repro/3796.php
)./bin/phpcs --standard=Squiz -s repro/3796.php
FILE: /**/**/**/PHP_CodeSniffer/repro/3796.php
----------------------------------------------------------------------------------------------------------------------------------
FOUND 4 ERRORS AND 2 WARNINGS AFFECTING 5 LINES
----------------------------------------------------------------------------------------------------------------------------------
1 | ERROR | [ ] Missing file doc comment (Squiz.Commenting.FileComment.Missing)
3 | ERROR | [x] TRUE, FALSE and NULL must be lowercase; expected "true" but found "TRUE"
| | (Generic.PHP.LowerCaseConstant.Found)
5 | ERROR | [x] No blank line found after control structure (Squiz.WhiteSpace.ControlStructureSpacing.NoLineAfterClose)
7 | WARNING | [ ] Code after the THROW statement on line 6 cannot be executed (Squiz.PHP.NonExecutableCode.Unreachable)
8 | WARNING | [ ] Code after the THROW statement on line 6 cannot be executed (Squiz.PHP.NonExecutableCode.Unreachable)
8 | ERROR | [x] Expected 1 newline at end of file; 0 found (PSR2.Files.EndFileNewline.NoneFound)
----------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------------------------------
Time: 137ms; Memory: 8MB
Code sample
Output
Not the the violation reported twice by some reason.