Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 3.7.2

Bug #16530 ScopeIndentSniff reports false positive
Submitted: 2009-08-17 13:27 UTC
From: sebastian Assigned: squiz
Status: Closed Package: PHP_CodeSniffer (version 1.2.0)
PHP Version: 5.3.0 OS: Irrelevant
Roadmaps: (Not assigned)    
Subscription  


 [2009-08-17 13:27 UTC] sebastian (Sebastian Bergmann)
Description: ------------ I think that Generic_Sniffs_Whitespace_ScopeIndentSniff reports false positives for case {} break; blocks. Test script: --------------- <?php switch (TRUE) { case TRUE: { /* ... */ } break; } Expected result: ---------------- No "Line indented incorrectly" error reported by PHP_CodeSniffer. Actual result: -------------- FILE: /home/sb/switch.php -------------------------------------------------------------------------------- FOUND 1 ERROR(S) AND 0 WARNING(S) AFFECTING 1 LINE(S) -------------------------------------------------------------------------------- 5 | ERROR | Line indented incorrectly; expected at least 8 spaces, found 4 --------------------------------------------------------------------------------

Comments

 [2009-08-21 07:20 UTC] squiz (Greg Sherwood)
-Status: Open +Status: Closed -Assigned To: +Assigned To: squiz
Additional processing is now done by the PHP tokenizer to fix up the scope closers for CASE statements that use curly braces.