Bug #19727 [Opn->Csd]: PSR2: no error reported when using } elseif {

From: Date: Mon, 03 Dec 2012 00:43:22 +0000
Subject: Bug #19727 [Opn->Csd]: PSR2: no error reported when using } elseif {
References: 1  Groups: php.pear.bugs 
Request: Send a blank email to pear-bugs+get-9386@lists.php.net to get a copy of this message
Edit report at https://pear.php.net/bugs/bug.php?id=19727&edit=1 ID: 19727 Updated by: gsherwood@squiz.net Reported By: info at strictcoding dot co dot uk Summary: PSR2: no error reported when using } elseif { -Status: Open +Status: Closed Type: Bug Package: PHP_CodeSniffer Operating System: CentOS Package Version: 1.4.2 PHP Version: 5.4.7 -Assigned To: +Assigned To: squiz Roadmap Versions: New Comment: -Status: Open +Status: Closed -Assigned To: +Assigned To: squiz Fix committed to github repo: https://github.com/squizlabs/PHP_CodeSniffer/commit/43313f3d752babaaf4b7347a1f7 cefb84c46a871 Previous Comments: ------------------------------------------------------------------------ [2012-11-29 15:52:57] bmorel 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! ------------------------------------------------------------------------ -- Edit this bug report at https://pear.php.net/bugs/bug.php?id=19727&edit=1

« previous php.pear.bugs (#9386) next »