@@ -77,7 +77,7 @@ discard block |
||
| 77 | 77 | $localizedCurrencies = include($this->currenciesDataDir . "/{$locale}/currency.php"); |
| 78 | 78 | |
| 79 | 79 | $currencies = []; |
| 80 | - foreach($country['currency'] as $currency) |
|
| 80 | + foreach ($country['currency'] as $currency) |
|
| 81 | 81 | { |
| 82 | 82 | $currencyCode = $currency['iso_4217_code']; |
| 83 | 83 | $currencies[$currencyCode] = $localizedCurrencies[$currencyCode]; |
@@ -100,17 +100,17 @@ discard block |
||
| 100 | 100 | $localizedCurrencies = include($this->currenciesDataDir . "/{$locale}/currency.php"); |
| 101 | 101 | |
| 102 | 102 | $countryNames = []; |
| 103 | - foreach($countries as $code) |
|
| 103 | + foreach ($countries as $code) |
|
| 104 | 104 | { |
| 105 | - if(isset($localizedCountries[$code])) |
|
| 105 | + if (isset($localizedCountries[$code])) |
|
| 106 | 106 | { |
| 107 | 107 | $countryNames[$code] = $localizedCountries[$code]; |
| 108 | 108 | } |
| 109 | 109 | } |
| 110 | 110 | $currencyNames = []; |
| 111 | - foreach($currencies as $code) |
|
| 111 | + foreach ($currencies as $code) |
|
| 112 | 112 | { |
| 113 | - if(isset($localizedCurrencies[$code])) |
|
| 113 | + if (isset($localizedCurrencies[$code])) |
|
| 114 | 114 | { |
| 115 | 115 | $currencyNames[$code] = $localizedCurrencies[$code]; |
| 116 | 116 | } |
@@ -185,8 +185,7 @@ discard block |
||
| 185 | 185 | public function formatMoney(int $amount, bool $showSymbol = true): string |
| 186 | 186 | { |
| 187 | 187 | $money = new Money($amount, $this->currency); |
| 188 | - return $showSymbol ? $money->formatLocale($this->_locale()) : |
|
| 189 | - $this->decimalFormatter()->format($money->getValue()); |
|
| 188 | + return $showSymbol ? $money->formatLocale($this->_locale()) : $this->decimalFormatter()->format($money->getValue()); |
|
| 190 | 189 | } |
| 191 | 190 | |
| 192 | 191 | /** |
@@ -196,7 +195,7 @@ discard block |
||
| 196 | 195 | */ |
| 197 | 196 | public function convertMoneyToInt(float $amount): int |
| 198 | 197 | { |
| 199 | - return (int)(new Money($amount, $this->currency, true))->getAmount(); |
|
| 198 | + return (int) (new Money($amount, $this->currency, true))->getAmount(); |
|
| 200 | 199 | } |
| 201 | 200 | |
| 202 | 201 | /** |