aepnat /
simpuskesmas
| 1 | <?php |
||
| 2 | |||
| 3 | |||
| 4 | function getUsia($bln) |
||
| 5 | { |
||
| 6 | switch ($bln) { |
||
| 7 | |||
| 8 | case 1: |
||
| 9 | |||
| 10 | return '12'; |
||
| 11 | |||
| 12 | break; |
||
|
0 ignored issues
–
show
|
|||
| 13 | |||
| 14 | case 2: |
||
| 15 | |||
| 16 | return '11'; |
||
| 17 | |||
| 18 | break; |
||
| 19 | |||
| 20 | case 3: |
||
| 21 | |||
| 22 | return '10'; |
||
| 23 | |||
| 24 | break; |
||
| 25 | |||
| 26 | case 4: |
||
| 27 | |||
| 28 | return '9'; |
||
| 29 | |||
| 30 | break; |
||
| 31 | |||
| 32 | case 5: |
||
| 33 | |||
| 34 | return '8'; |
||
| 35 | |||
| 36 | break; |
||
| 37 | |||
| 38 | case 6: |
||
| 39 | |||
| 40 | return '7'; |
||
| 41 | |||
| 42 | break; |
||
| 43 | |||
| 44 | case 7: |
||
| 45 | |||
| 46 | return '6'; |
||
| 47 | |||
| 48 | break; |
||
| 49 | |||
| 50 | case 8: |
||
| 51 | |||
| 52 | return '5'; |
||
| 53 | |||
| 54 | break; |
||
| 55 | |||
| 56 | case 9: |
||
| 57 | |||
| 58 | return '4'; |
||
| 59 | |||
| 60 | break; |
||
| 61 | |||
| 62 | case 10: |
||
| 63 | |||
| 64 | return '3'; |
||
| 65 | |||
| 66 | break; |
||
| 67 | |||
| 68 | case 11: |
||
| 69 | |||
| 70 | return '2'; |
||
| 71 | |||
| 72 | break; |
||
| 73 | |||
| 74 | case 12: |
||
| 75 | |||
| 76 | return '1'; |
||
| 77 | |||
| 78 | break; |
||
| 79 | |||
| 80 | } |
||
| 81 | } |
||
| 82 | |||
| 83 | ?> |
||
|
0 ignored issues
–
show
It is not recommended to use PHP's closing tag
?> in files other than templates.
Using a closing tag in PHP files that only contain PHP code is not recommended as you might accidentally add whitespace after the closing tag which would then be output by PHP. This can cause severe problems, for example headers cannot be sent anymore. A simple precaution is to leave off the closing tag as it is not required, and it also has no negative effects whatsoever. Loading history...
|
|||
| 84 | |||
| 85 |
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.