FAQ
Edit report at http://pear.php.net/bugs/bug.php?id=16530&edit=1

ID: 16530
Updated by: gsherwood@squiz.net
Reported By: sb at sebastian-bergmann dot de
Summary: ScopeIndentSniff reports false positive
-Status: Open
+Status: Closed
Type: Bug
Package: PHP_CodeSniffer
Operating System: Irrelevant
Package Version: 1.2.0
PHP Version: 5.3.0
-Assigned To:
+Assigned To: squiz
Roadmap Versions:
New Comment:

-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.


Previous Comments:
------------------------------------------------------------------------

[2009-08-17 09:27:57] sebastian

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
--------------------------------------------------------------------------------

------------------------------------------------------------------------

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppear-bugs @
categoriesphp
postedAug 21, '09 at 1:20a
activeAug 21, '09 at 1:20a
posts1
users1
websitepear.php.net

1 user in discussion

Gsherwood: 1 post

People

Translate

site design / logo © 2022 Grokbase