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

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)    
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:
Solve the problem : 34 - 12 = ?

 [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!


 [2012-12-03 05:43 UTC] squiz (Greg Sherwood)
-Status: Open +Status: Closed -Assigned To: +Assigned To: squiz
Fix committed to github repo: cefb84c46a871