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

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)    
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 : 39 - 13 = ?

 [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;} }


 [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 by the end of next Sunday (CET). If this was a problem with the 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.