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

Bug #19727 PSR2: no error reported when using } elseif {
Submitted: 2012-11-29 15:52 UTC Modified: 2012-12-03 00:43 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  


 [2012-11-29 15: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 00: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