From 25f8acb417fecb930ca9cc206bc9c957ff30e59d Mon Sep 17 00:00:00 2001 From: James Cole Date: Sun, 18 Jun 2023 06:26:50 +0200 Subject: [PATCH] Chore: use of else in accountform --- app/Support/Form/AccountForm.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/app/Support/Form/AccountForm.php b/app/Support/Form/AccountForm.php index bd0d1be23d..fc0f25c3b3 100644 --- a/app/Support/Form/AccountForm.php +++ b/app/Support/Form/AccountForm.php @@ -171,13 +171,14 @@ class AccountForm $role = (string)$repository->getMetaValue($account, 'account_role'); if (in_array($account->accountType->type, $liabilityTypes, true)) { $role = sprintf('l_%s', $account->accountType->type); - } elseif ('' === $role) { + } + if ('' === $role) { + $role = 'no_account_type'; if (AccountType::EXPENSE === $account->accountType->type) { $role = 'expense_account'; - } elseif (AccountType::REVENUE === $account->accountType->type) { + } + if (AccountType::REVENUE === $account->accountType->type) { $role = 'revenue_account'; - } else { - $role = 'no_account_type'; } } $key = (string)trans(sprintf('firefly.opt_group_%s', $role));