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

Bug #19727 PSR2: no error reported when using } elseif {
Submitted: 2012-11-29 20:52 UTC
From: bmorel Assigned: squiz
Status: Closed Package: PHP_CodeSniffer (version 1.4.2)
PHP Version: 5.4.7 OS: CentOS
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 : 31 + 40 = ?

 
 [2012-11-29 20:52 UTC] bmorel (Benjamin Morel)
Description: ------------ While the correct violations are reported when using 'else', no error is reported when using 'elseif', as demonstrated in the code below. Test script: --------------- if ($a) { } elseif { } Expected result: ---------------- Expected "} elseif {\n"; found "}\nelseif {\n" Actual result: -------------- No error reported!

Comments

 [2012-12-03 05:43 UTC] squiz (Greg Sherwood)
-Status: Open +Status: Closed -Assigned To: +Assigned To: squiz
Fix committed to github repo: https://github.com/squizlabs/PHP_CodeSniffer/commit/43313f3d752babaaf4b7347a1f7 cefb84c46a871