mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
[chore] fix phpstan errors.
This commit is contained in:
@@ -48,7 +48,7 @@ class AmountFormat extends AbstractExtension
|
||||
return new TwigFilter(
|
||||
'formatAmount',
|
||||
static function (string $string): string {
|
||||
$currency = app('amount')->getDefaultCurrency();
|
||||
$currency = app('amount')->getNativeCurrency();
|
||||
|
||||
return app('amount')->formatAnything($currency, $string, true);
|
||||
},
|
||||
@@ -61,7 +61,7 @@ class AmountFormat extends AbstractExtension
|
||||
return new TwigFilter(
|
||||
'formatAmountPlain',
|
||||
static function (string $string): string {
|
||||
$currency = app('amount')->getDefaultCurrency();
|
||||
$currency = app('amount')->getNativeCurrency();
|
||||
|
||||
return app('amount')->formatAnything($currency, $string, false);
|
||||
},
|
||||
@@ -93,7 +93,7 @@ class AmountFormat extends AbstractExtension
|
||||
|
||||
/** @var AccountRepositoryInterface $accountRepos */
|
||||
$accountRepos = app(AccountRepositoryInterface::class);
|
||||
$currency = $accountRepos->getAccountCurrency($account) ?? app('amount')->getDefaultCurrency();
|
||||
$currency = $accountRepos->getAccountCurrency($account) ?? app('amount')->getNativeCurrency();
|
||||
|
||||
return app('amount')->formatAnything($currency, $amount, $coloured);
|
||||
},
|
||||
|
@@ -69,7 +69,7 @@ class General extends AbstractExtension
|
||||
$date = session('end', today(config('app.timezone'))->endOfMonth());
|
||||
$info = Steam::finalAccountBalance($account, $date);
|
||||
$currency = Steam::getAccountCurrency($account);
|
||||
$default = Amount::getDefaultCurrency();
|
||||
$default = Amount::getNativeCurrency();
|
||||
$convertToNative = Amount::convertToNative();
|
||||
$useNative = $convertToNative && $default->id !== $currency->id;
|
||||
$strings = [];
|
||||
|
Reference in New Issue
Block a user