we\'re trying to implement new coding style guidelines for our team, the php codesniffer is printing an warning on switch case statements when no \"break\" is found like:
I have much better solution.Please follow below code for above switch statment:
$result = 3; // for default case switch ($foo) { case 1: $result = 1; break; case 2: $result = 2; break; default: // do nothing } return $result;
It will not result in any error and code is also fine with concepts.