Refactor phpstan errors.

This commit is contained in:
James Cole
2023-10-29 17:41:14 +01:00
parent 5e32878d01
commit 12675dd950
60 changed files with 297 additions and 386 deletions

View File

@@ -416,7 +416,7 @@ class BudgetRepository implements BudgetRepositoryInterface
$autoBudget = $this->getAutoBudget($budget);
// grab default currency:
$currency = app('amount')->getDefaultCurrencyByUser($this->user);
$currency = app('amount')->getDefaultCurrencyByUserGroup($this->user->userGroup);
if (null === $autoBudget) {
// at this point it's a blind assumption auto_budget_type is 1 or 2.
@@ -847,7 +847,7 @@ class BudgetRepository implements BudgetRepositoryInterface
$currency = $repos->findByCode((string)$data['currency_code']);
}
if (null === $currency) {
$currency = app('amount')->getDefaultCurrencyByUser($this->user);
$currency = app('amount')->getDefaultCurrencyByUserGroup($this->user->userGroup);
}
$autoBudget = new AutoBudget();