Reformat various code.

This commit is contained in:
James Cole
2022-03-29 15:00:29 +02:00
parent d1a09ff33b
commit d04efb8325
81 changed files with 662 additions and 662 deletions

View File

@@ -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 */