| Conditions | 6 |
| Paths | 4 |
| Total Lines | 17 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 18 | public static function curriencies($longlist = false): array |
||
| 19 | { |
||
| 20 | $list = $longlist ? 'longlist' : 'shortlist'; |
||
| 21 | |||
| 22 | if(!isset(static::$curriencies[$list])) { |
||
| 23 | |||
| 24 | $countries = CountryLoader::countries(true); |
||
| 25 | |||
| 26 | foreach ($countries as $country) { |
||
| 27 | foreach ($country["currency"] as $currency => $details) { |
||
| 28 | static::$curriencies[$list][$currency] = $longlist? $details: $currency; |
||
| 29 | } |
||
| 30 | } |
||
| 31 | } |
||
| 32 | |||
| 33 | return static::$curriencies[$list]; |
||
| 34 | } |
||
| 35 | } |
||
| 36 |