Code cleanup

This commit is contained in:
James Cole
2024-12-22 08:43:12 +01:00
parent 5751f7e5a3
commit 565bd87959
574 changed files with 4600 additions and 4604 deletions

View File

@@ -93,7 +93,7 @@ class AccountCurrencies extends Command
{
$configVar = app('fireflyconfig')->get(self::CONFIG_NAME, false);
return (bool)$configVar?->data;
return (bool) $configVar?->data;
}
private function updateAccountCurrencies(): void
@@ -124,9 +124,9 @@ class AccountCurrencies extends Command
private function updateAccount(Account $account, TransactionCurrency $currency): void
{
$this->accountRepos->setUser($account->user);
$accountCurrency = (int)$this->accountRepos->getMetaValue($account, 'currency_id');
$accountCurrency = (int) $this->accountRepos->getMetaValue($account, 'currency_id');
$openingBalance = $this->accountRepos->getOpeningBalance($account);
$obCurrency = (int)$openingBalance?->transaction_currency_id;
$obCurrency = (int) $openingBalance?->transaction_currency_id;
// both 0? set to default currency:
if (0 === $accountCurrency && 0 === $obCurrency) {