| Conditions | 7 |
| Paths | 5 |
| Total Lines | 17 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 7.0957 |
| Changes | 1 | ||
| Bugs | 1 | Features | 0 |
| 1 | <?php |
||
| 23 | 26 | public function getFileName($countryCallingCode, $language, $script, $region) |
|
|
|
|||
| 24 | { |
||
| 25 | 26 | if (strlen($language) == 0) { |
|
| 26 | return ""; |
||
| 27 | } |
||
| 28 | |||
| 29 | 26 | if ($language === 'zh' && ($region == 'TW' || $region == 'HK' || $region == 'MO')) { |
|
| 30 | 21 | $language = 'zh_Hant'; |
|
| 31 | } |
||
| 32 | |||
| 33 | if ($this->inMap($language, $countryCallingCode)) { |
||
| 34 | 9 | return $language . DIRECTORY_SEPARATOR . $countryCallingCode . '.php'; |
|
| 35 | } |
||
| 36 | |||
| 37 | 26 | ||
| 38 | return ""; |
||
| 39 | 26 | } |
|
| 40 | |||
| 47 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.