| Conditions | 6 |
| Paths | 6 |
| Total Lines | 24 |
| Code Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | |||
| 15 | function filterCountry($country = null) |
||
| 16 | { |
||
| 17 | if ($country == null) { |
||
| 18 | return 'NG'; |
||
| 19 | } |
||
| 20 | $country = strtoupper($country); |
||
| 21 | |||
| 22 | if ($country == 'NIGERIA') { |
||
| 23 | return 'NG'; |
||
| 24 | } |
||
| 25 | |||
| 26 | if ($country == 'GHANA') { |
||
| 27 | return 'GH'; |
||
| 28 | } |
||
| 29 | |||
| 30 | if ($country == 'KENYA') { |
||
| 31 | return 'KE'; |
||
| 32 | } |
||
| 33 | |||
| 34 | if ($country == 'UGANDA') { |
||
| 35 | return 'UG'; |
||
| 36 | } |
||
| 37 | |||
| 38 | return $country; |
||
| 39 | } |
||
| 41 |