mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 23:45:10 +00:00
Reformat various code.
This commit is contained in:
@@ -51,7 +51,7 @@ class Amount
|
||||
*/
|
||||
public function formatAnything(TransactionCurrency $format, string $amount, bool $coloured = null): string
|
||||
{
|
||||
return $this->formatFlat($format->symbol, (int)$format->decimal_places, $amount, $coloured);
|
||||
return $this->formatFlat($format->symbol, (int) $format->decimal_places, $amount, $coloured);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -77,7 +77,7 @@ class Amount
|
||||
$fmt->setSymbol(NumberFormatter::CURRENCY_SYMBOL, $symbol);
|
||||
$fmt->setAttribute(NumberFormatter::MIN_FRACTION_DIGITS, $decimalPlaces);
|
||||
$fmt->setAttribute(NumberFormatter::MAX_FRACTION_DIGITS, $decimalPlaces);
|
||||
$result = $fmt->format((float)$amount);
|
||||
$result = $fmt->format((float) $amount);
|
||||
|
||||
if (true === $coloured) {
|
||||
if ($amount > 0) {
|
||||
@@ -131,7 +131,7 @@ class Amount
|
||||
}
|
||||
$cache->store(config('firefly.default_currency', 'EUR'));
|
||||
|
||||
return (string)config('firefly.default_currency', 'EUR');
|
||||
return (string) config('firefly.default_currency', 'EUR');
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -164,7 +164,7 @@ class Amount
|
||||
$currencyPrefStr = $currencyPreference ? $currencyPreference->data : 'EUR';
|
||||
|
||||
// at this point the currency preference could be encrypted, if coming from an old version.
|
||||
$currencyCode = $this->tryDecrypt((string)$currencyPrefStr);
|
||||
$currencyCode = $this->tryDecrypt((string) $currencyPrefStr);
|
||||
|
||||
// could still be json encoded:
|
||||
/** @var TransactionCurrency|null $currency */
|
||||
|
Reference in New Issue
Block a user