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

Bug #18975 "Closing parenthesis must be on a line by itself" also causes indentation error
Submitted: 2011-11-09 21:58 UTC
From: bkendig Assigned: squiz
Status: Closed Package: PHP_CodeSniffer (version 1.3.1)
PHP Version: 5.3.8 OS: Mac OS X 10.6.8
Roadmaps: (Not assigned)    
Subscription  
Comments Add Comment Add patch


Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem : 3 + 41 = ?

 
 [2011-11-09 21:58 UTC] bkendig (Brian Kendig)
Description: ------------ When the closing parenthesis of a multi-line function call (or object definition) isn't on a line by itself, it also causes phpcs to report a "not indented correctly" error. That latter error doesn't make sense in this context. Test script: --------------- $ cat foo.php <?php $foo = new stdClass( 1, 2, 3); Expected result: ---------------- A "missing file doc comment" error and a "closing parenthesis of a multi-line function call must be on a line by itself" error. Actual result: -------------- $ phpcs foo.php FILE: /Users/brkendig/foo.php ------------------------------------------------------------------------ -------- FOUND 3 ERROR(S) AFFECTING 2 LINE(S) ------------------------------------------------------------------------ -------- 2 | ERROR | Missing file doc comment 5 | ERROR | Multi-line function call not indented correctly; expected 0 spaces | | but found 4 5 | ERROR | Closing parenthesis of a multi-line function call must be on a | | line by itself ------------------------------------------------------------------------ -------- Time: 0 seconds, Memory: 3.00Mb

Comments

 [2011-11-11 05:14 UTC] squiz (Greg Sherwood)
-Status: Open +Status: Closed -Assigned To: +Assigned To: squiz
Fix committed.