| Conditions | 6 |
| Paths | 6 |
| Total Lines | 8 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 82 | public function getCat($str) |
||
| 83 | { |
||
| 84 | switch ($str) { |
||
| 85 | case "penyakit": return "Penyakit"; break; |
||
|
|
|||
| 86 | case "obat": return "Obat - obatan"; break; |
||
| 87 | case "hidup-sehat": return "Hidup Sehat"; break; |
||
| 88 | case "keluarga": return "Keluarga"; break; |
||
| 89 | case "kesehatan": return "Kesehatan"; break; |
||
| 90 | } |
||
| 93 |
The
breakstatement is not necessary if it is preceded for example by areturnstatement:If you would like to keep this construct to be consistent with other
casestatements, you can safely mark this issue as a false-positive.