Conditions | 2 |
Paths | 2 |
Total Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
27 | public function getSymbol($locale = null): string |
||
28 | { |
||
29 | if (null === $locale) { |
||
30 | $locale = Yii::$app->formatter->locale; |
||
31 | } |
||
32 | $fmt = new NumberFormatter($locale . "@currency={$this->code}", NumberFormatter::CURRENCY); |
||
33 | $symbol = $fmt->getSymbol(NumberFormatter::CURRENCY_SYMBOL); |
||
34 | |||
35 | return $symbol; |
||
36 | } |
||
37 | } |
||
38 |