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

Bug #17313 Bug with switch case struture
Submitted: 2010-04-15 20:01 UTC
From: jonatas_fischer Assigned: squiz
Status: Closed Package: PHP_CodeSniffer (version Unknown)
PHP Version: 5.3.2 OS: Windows
Roadmaps: (Not assigned)    
Subscription  


 [2010-04-15 20:01 UTC] jonatas_fischer (Jonatas Fischer)
Description: ------------ switch($action){ case SALVAR:{ header("Location: ".site_url("empresas/edit/".$id.$refresh_call)); break;} case SALVAR_INSERIR:{ header("Location: ".site_url("empresas/addnew".$refresh_call)); break;} case SALVAR_FECHAR:{ if($refresh_call=='') $call='window.opener.'.base64_decode($refresh_call).';'; echo $call.SCRIPT_FECHAR_JANELA; break;} }

Comments

 [2010-04-19 06:49 UTC] squiz (Greg Sherwood)
-Status: Open +Status: Closed -Assigned To: +Assigned To: squiz
This bug has been fixed in SVN. If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET). If this was a problem with the pear.php.net website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better. For those maybe wondering what the issue was: When you run this with the Squiz standard you get a PHP notice from the LongConditionClosingComment sniff because the case statements are using braces. This sniff will now correctly process these sort of CASE statements and require comments for long CASE statements that use braces.