mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-15 08:35:00 +00:00
Refactor phpstan errors.
This commit is contained in:
@@ -294,7 +294,7 @@ class BudgetLimitRepository implements BudgetLimitRepositoryInterface
|
||||
$factory = app(TransactionCurrencyFactory::class);
|
||||
$currency = $factory->find($data['currency_id'] ?? null, $data['currency_code'] ?? null);
|
||||
if (null === $currency) {
|
||||
$currency = app('amount')->getDefaultCurrencyByUser($this->user);
|
||||
$currency = app('amount')->getDefaultCurrencyByUserGroup($this->user->userGroup);
|
||||
}
|
||||
$currency->enabled = true;
|
||||
$currency->save();
|
||||
@@ -371,7 +371,7 @@ class BudgetLimitRepository implements BudgetLimitRepositoryInterface
|
||||
}
|
||||
// catch unexpected null:
|
||||
if (null === $currency) {
|
||||
$currency = $budgetLimit->transactionCurrency ?? app('amount')->getDefaultCurrencyByUser($this->user);
|
||||
$currency = $budgetLimit->transactionCurrency ?? app('amount')->getDefaultCurrencyByUserGroup($this->user->userGroup);
|
||||
}
|
||||
$currency->enabled = true;
|
||||
$currency->save();
|
||||
|
Reference in New Issue
Block a user