mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-26 13:36:15 +00:00
[chore] fix phpstan errors.
This commit is contained in:
@@ -50,7 +50,7 @@ class AccountTransformer extends AbstractTransformer
|
||||
$this->parameters = new ParameterBag();
|
||||
$this->repository = app(AccountRepositoryInterface::class);
|
||||
$this->convertToNative = Amount::convertToNative();
|
||||
$this->default = Amount::getDefaultCurrency();
|
||||
$this->default = Amount::getNativeCurrency();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -72,7 +72,7 @@ class AccountTransformer extends AbstractTransformer
|
||||
$convertToNative = Amount::convertToNative();
|
||||
|
||||
// get account role (will only work if the type is asset).
|
||||
$default = Amount::getDefaultCurrency();
|
||||
$default = Amount::getNativeCurrency();
|
||||
$accountRole = $this->getAccountRole($account, $accountType);
|
||||
$date = $this->getDate();
|
||||
$date->endOfDay();
|
||||
|
||||
@@ -50,7 +50,7 @@ class AvailableBudgetTransformer extends AbstractTransformer
|
||||
$this->repository = app(BudgetRepositoryInterface::class);
|
||||
$this->opsRepository = app(OperationsRepositoryInterface::class);
|
||||
$this->noBudgetRepository = app(NoBudgetRepositoryInterface::class);
|
||||
$this->default = Amount::getDefaultCurrency();
|
||||
$this->default = Amount::getNativeCurrency();
|
||||
$this->convertToNative = Amount::convertToNative();
|
||||
}
|
||||
|
||||
|
||||
@@ -52,7 +52,7 @@ class BillTransformer extends AbstractTransformer
|
||||
{
|
||||
$this->repository = app(BillRepositoryInterface::class);
|
||||
$this->calculator = app(BillDateCalculator::class);
|
||||
$this->default = Amount::getDefaultCurrency();
|
||||
$this->default = Amount::getNativeCurrency();
|
||||
$this->convertToNative = Amount::convertToNative();
|
||||
}
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@ class BudgetLimitTransformer extends AbstractTransformer
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->default = Amount::getDefaultCurrency();
|
||||
$this->default = Amount::getNativeCurrency();
|
||||
$this->convertToNative = Amount::convertToNative();
|
||||
}
|
||||
|
||||
|
||||
@@ -51,7 +51,7 @@ class BudgetTransformer extends AbstractTransformer
|
||||
$this->opsRepository = app(OperationsRepositoryInterface::class);
|
||||
$this->repository = app(BudgetRepositoryInterface::class);
|
||||
$this->parameters = new ParameterBag();
|
||||
$this->default = Amount::getDefaultCurrency();
|
||||
$this->default = Amount::getNativeCurrency();
|
||||
$this->convertToNative = Amount::convertToNative();
|
||||
}
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ class CategoryTransformer extends AbstractTransformer
|
||||
{
|
||||
$this->opsRepository = app(OperationsRepositoryInterface::class);
|
||||
$this->repository = app(CategoryRepositoryInterface::class);
|
||||
$this->default = Amount::getDefaultCurrency();
|
||||
$this->default = Amount::getNativeCurrency();
|
||||
$this->convertToNative = Amount::convertToNative();
|
||||
}
|
||||
|
||||
|
||||
@@ -135,7 +135,7 @@ class AccountTransformer extends AbstractTransformer
|
||||
|
||||
private function getDefaultCurrency(): void
|
||||
{
|
||||
$this->default = app('amount')->getDefaultCurrency();
|
||||
$this->default = app('amount')->getNativeCurrency();
|
||||
}
|
||||
|
||||
private function collectAccountMetaData(Collection $accounts): void
|
||||
|
||||
@@ -97,7 +97,7 @@ class BillTransformer extends AbstractTransformer
|
||||
];
|
||||
}
|
||||
Log::debug(sprintf('Created new ExchangeRateConverter in %s', __METHOD__));
|
||||
$this->default = app('amount')->getDefaultCurrency();
|
||||
$this->default = app('amount')->getNativeCurrency();
|
||||
$this->converter = new ExchangeRateConverter();
|
||||
|
||||
// grab all paid dates:
|
||||
|
||||
@@ -156,7 +156,7 @@ class PiggyBankTransformer extends AbstractTransformer
|
||||
// $this->piggyRepos->setUser($account->user);
|
||||
|
||||
// get currency from account, or use default.
|
||||
// $currency = $this->accountRepos->getAccountCurrency($account) ?? app('amount')->getDefaultCurrencyByUser($account->user);
|
||||
// $currency = $this->accountRepos->getAccountCurrency($account) ?? app('amount')->getNativeCurrencyByUser($account->user);
|
||||
|
||||
// note
|
||||
// $notes = $this->piggyRepos->getNoteText($piggyBank);
|
||||
|
||||
@@ -79,7 +79,7 @@ class TransactionGroupTransformer extends AbstractTransformer
|
||||
}
|
||||
}
|
||||
|
||||
$this->default = app('amount')->getDefaultCurrency();
|
||||
$this->default = app('amount')->getNativeCurrency();
|
||||
$this->converter = new ExchangeRateConverter();
|
||||
|
||||
$this->collectAllMetaData();
|
||||
|
||||
Reference in New Issue
Block a user