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

Bug #19416 Shorthand arrays cause bracket spacing errors
Submitted: 2012-05-11 04:54 UTC
From: jrdn Assigned: squiz
Status: Closed Package: PHP_CodeSniffer (version 1.3.3)
PHP Version: 5.4.0 OS: OSx & Linux
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 : 45 - 36 = ?

 
 [2012-05-11 04:54 UTC] jrdn (Jordan Stout)
Description: ------------ PHP_Sniffer doesn't put into account of the new shorthand array syntax: $foo = []; throws an error: "Space found before square bracket; expected =[ but found = [" Test script: --------------- $test = []; Expected result: ---------------- No errors. Actual result: -------------- "Space found before square bracket; expected =[ but found = ["

Comments

 [2012-06-05 05:58 UTC] squiz (Greg Sherwood)
-Summary: Shorthand Arrays +Summary: Shorthand arrays cause bracket spacing errors -Assigned To: +Assigned To: squiz
 [2012-06-05 06:01 UTC] squiz (Greg Sherwood)
-Status: Assigned +Status: Closed
Fixed in git repo. Discussion and commit link here: https://github.com/squizlabs/PHP_CodeSniffer/pull/34