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

Bug #19538 Function identation code sniffer checks inside short arrays
Submitted: 2012-08-02 16:40 UTC
From: lstrojny_in Assigned: squiz
Status: Closed Package: PHP_CodeSniffer (version 1.3.5)
PHP Version: 5.4.5 OS:
Roadmaps: (Not assigned)    
Subscription  


 [2012-08-02 16:40 UTC] lstrojny_in (Lars Strojny)
Description: ------------ The FunctionCallSignatureSniff does not work well with multi line short syntax array in PHP 5.4. I would expect the following to work well. Test script: --------------- <?php foo( [ 'this', 'is', 'an', 'array' ] ); Actual result: -------------- --------------------------------------------------------------------------- ----- FOUND 4 ERROR(S) AFFECTING 4 LINE(S) --------------------------------------------------------------------------- ----- 4 | ERROR | Multi-line function call not indented correctly; expected 4 spaces | | but found 8 5 | ERROR | Multi-line function call not indented correctly; expected 4 spaces | | but found 8 6 | ERROR | Multi-line function call not indented correctly; expected 4 spaces | | but found 8 7 | ERROR | Multi-line function call not indented correctly; expected 4 spaces | | but found 8 --------------------------------------------------------------------------- -----

Comments

 [2012-08-17 10:53 UTC] squiz (Greg Sherwood)
-Summary: Function identation code sniffer +Summary: Function identation code sniffer checks inside short arrays -Assigned To: +Assigned To: squiz
 [2012-08-17 10:56 UTC] squiz (Greg Sherwood)
-Status: Assigned +Status: Closed
Fixed in the github repo.