You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
--------------------------------------------------------------------------------------------------------------------------------------
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)
--------------------------------------------------------------------------------------------------------------------------------------
Not the the violation reported twice by some reason.
The text was updated successfully, but these errors were encountered:
I've tried to reproduce and I was able to reproduce, the required steps are:
Take the above content and put it in a file (repro/3796.php)
Run phpcs from the current master branch (commit b0ecdf1) using the Squiz standard./bin/phpcs --standard=Squiz -s repro/3796.php
The output contains the above mentioned erroneous output.
Output:
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.
The text was updated successfully, but these errors were encountered: