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

Request #20216 Add support for List declarations
Submitted: 2014-03-08 04:02 UTC
From: moorereason Assigned:
Status: Open Package: PHP_CodeSniffer (version 1.5.2)
PHP Version: Irrelevant OS: CentOS 6
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 : 28 + 43 = ?

 
 [2014-03-08 04:02 UTC] moorereason (Cameron Moore)
Description: ------------ The use of a List keyword is not validated in the same way that an Array declaration is. Lists are only validated as being lowercase (in Generic.PHP.LowerCaseKeyword). Test script: --------------- list($a, $b) = foo(); // good list(,, $a, $b) = foo(); // good list($a,$b) = foo(); // error - no space after comma list(,,$a, $b) = foo(); // error - space after open paren Expected result: ---------------- I expect a List to be validated similarly to an Array (except without the key=>value features).

Comments