Firefly III: a personal finances manager
PHP accountingbudgetbudgetingbudgetscash-flowcashflowcredit-carddockerexpensesfinancefinancesfinanciallinuxmoneypaycheckpersonal-financephpphp7
Various issues fixed (SonarQube)
James Cole372c6ac66755
diff --git a/app/Api/V1/Requests/TransactionStoreRequest.php b/app/Api/V1/Requests/TransactionStoreRequest.phpindex ef9e05eac3..a39a61c7bb 100644--- a/app/Api/V1/Requests/TransactionStoreRequest.php+++ b/app/Api/V1/Requests/TransactionStoreRequest.php@@ -82,10 +82,9 @@ class TransactionStoreRequest extends FormRequest{$return = [];/**- * @var int $index* @var array $transaction*/- foreach ($this->get('transactions') as $index => $transaction) {+ foreach ($this->get('transactions') as $transaction) {$object = new NullArrayObject($transaction);$return[] = ['type' => $this->stringFromValue($object['type']),diff --git a/app/Factory/TransactionJournalFactory.php b/app/Factory/TransactionJournalFactory.phpindex 03104bb1ce..e78b2ee938 100644--- a/app/Factory/TransactionJournalFactory.php+++ b/app/Factory/TransactionJournalFactory.php@@ -63,7 +63,6 @@ class TransactionJournalFactoryprivate array $fields;private PiggyBankEventFactory $piggyEventFactory;private PiggyBankRepositoryInterface $piggyRepository;- private TransactionFactory $transactionFactory;private TransactionTypeRepositoryInterface $typeRepository;private User $user;diff --git a/app/Generator/Report/Audit/MonthReportGenerator.php b/app/Generator/Report/Audit/MonthReportGenerator.phpindex b7b5b03aff..4414f5718c 100644--- a/app/Generator/Report/Audit/MonthReportGenerator.php+++ b/app/Generator/Report/Audit/MonthReportGenerator.php@@ -155,7 +155,7 @@ class MonthReportGenerator implements ReportGeneratorInterfacereturn ['journals' => $journals,'currency' => $currency,- 'exists' => count($journals) > 0,+ 'exists' => !empty($journals),'end' => $this->end->formatLocalized((string) trans('config.month_and_day', [], $locale)),'endBalance' => app('steam')->balance($account, $this->end),'dayBefore' => $date->formatLocalized((string) trans('config.month_and_day', [], $locale)),diff --git a/app/Helpers/Attachments/AttachmentHelper.php b/app/Helpers/Attachments/AttachmentHelper.phpindex 12af2e9376..71004cd113 100644--- a/app/Helpers/Attachments/AttachmentHelper.php+++ b/app/Helpers/Attachments/AttachmentHelper.php@@ -224,7 +224,7 @@ class AttachmentHelper implements AttachmentHelperInterface}Log::debug('Done processing uploads.');}- if (!is_array($files) || (is_array($files) && 0 === count($files))) {+ if (!is_array($files) || empty($files)) {Log::debug('Array of files is not an array. Probably nothing uploaded. Will not store attachments.');}diff --git a/app/Helpers/Collector/GroupCollector.php b/app/Helpers/Collector/GroupCollector.phpindex cf20585286..543701d9db 100644--- a/app/Helpers/Collector/GroupCollector.php+++ b/app/Helpers/Collector/GroupCollector.php@@ -267,7 +267,7 @@ class GroupCollector implements GroupCollectorInterface*/public function setJournalIds(array $journalIds): GroupCollectorInterface{- if (count($journalIds) > 0) {+ if (!empty($journalIds)) {$this->query->whereIn('transaction_journals.id', $journalIds);}diff --git a/app/Http/Controllers/Auth/LoginController.php b/app/Http/Controllers/Auth/LoginController.phpindex 7829d9fba5..ebbc93b95e 100644--- a/app/Http/Controllers/Auth/LoginController.php+++ b/app/Http/Controllers/Auth/LoginController.php@@ -116,7 +116,7 @@ class LoginController extends Controller$this->incrementLoginAttempts($request);Log::channel('audit')->info(sprintf('Login failed. Attempt for user "%s" failed.', $request->get('email')));- return $this->sendFailedLoginResponse($request);+ $this->sendFailedLoginResponse($request);}/**diff --git a/app/Http/Controllers/Bill/IndexController.php b/app/Http/Controllers/Bill/IndexController.phpindex 4d9bc7dc1c..ab80335a04 100644--- a/app/Http/Controllers/Bill/IndexController.php+++ b/app/Http/Controllers/Bill/IndexController.php@@ -264,10 +264,9 @@ class IndexController extends Controllerreturn [];}/**- * @var int $objectGroupId* @var array $array*/- foreach ($sums as $objectGroupId => $array) {+ foreach ($sums as $array) {/*** @var int $currencyId* @var array $entrydiff --git a/app/Http/Controllers/Chart/BudgetController.php b/app/Http/Controllers/Chart/BudgetController.phpindex fdb8f6b368..47afba58a3 100644--- a/app/Http/Controllers/Chart/BudgetController.php+++ b/app/Http/Controllers/Chart/BudgetController.php@@ -50,16 +50,11 @@ class BudgetController extends Controller{use DateCalculation, AugumentData;- /** @var GeneratorInterface Chart generation methods. */- protected $generator;- /** @var OperationsRepositoryInterface */- protected $opsRepository;- /** @var BudgetRepositoryInterface The budget repository */- protected $repository;- /** @var BudgetLimitRepositoryInterface */- private $blRepository;- /** @var NoBudgetRepositoryInterface */- private $nbRepository;+ protected GeneratorInterface $generator;+ protected OperationsRepositoryInterface $opsRepository;+ protected BudgetRepositoryInterface $repository;+ private BudgetLimitRepositoryInterface $blRepository;+ private NoBudgetRepositoryInterface $nbRepository;/*** BudgetController constructor.@@ -185,12 +180,12 @@ class BudgetController extends Controllerwhile ($start <= $end) {$spent = $this->opsRepository->spentInPeriod($budgetCollection, new Collection, $start, $start);$amount = bcadd($amount, $spent);- $format = $start->formatLocalized((string) trans('config.month_and_day', [], $locale));+ $format = $start->formatLocalized((string)trans('config.month_and_day', [], $locale));$entries[$format] = $amount;$start->addDay();}- $data = $this->generator->singleSet((string) trans('firefly.left'), $entries);+ $data = $this->generator->singleSet((string)trans('firefly.left'), $entries);// add currency symbol from budget limit:$data['datasets'][0]['currency_symbol'] = $budgetLimit->transactionCurrency->symbol;$data['datasets'][0]['currency_code'] = $budgetLimit->transactionCurrency->code;@@ -239,7 +234,7 @@ class BudgetController extends Controller// group by asset account ID:foreach ($journals as $journal) {- $key = sprintf('%d-%d', (int) $journal['source_account_id'], $journal['currency_id']);+ $key = sprintf('%d-%d', (int)$journal['source_account_id'], $journal['currency_id']);$result[$key] = $result[$key] ?? ['amount' => '0','currency_symbol' => $journal['currency_symbol'],@@ -252,7 +247,7 @@ class BudgetController extends Controller$names = $this->getAccountNames(array_keys($result));foreach ($result as $combinedId => $info) {$parts = explode('-', $combinedId);- $assetId = (int) $parts[0];+ $assetId = (int)$parts[0];$title = sprintf('%s (%s)', $names[$assetId] ?? '(empty)', $info['currency_name']);$chartData[$title]= [@@ -319,7 +314,7 @@ class BudgetController extends Controller$names = $this->getCategoryNames(array_keys($result));foreach ($result as $combinedId => $info) {$parts = explode('-', $combinedId);- $categoryId = (int) $parts[0];+ $categoryId = (int)$parts[0];$title = sprintf('%s (%s)', $names[$categoryId] ?? '(empty)', $info['currency_name']);$chartData[$title] = ['amount' => $info['amount'],@@ -385,7 +380,7 @@ class BudgetController extends Controller$names = $this->getAccountNames(array_keys($result));foreach ($result as $combinedId => $info) {$parts = explode('-', $combinedId);- $opposingId = (int) $parts[0];+ $opposingId = (int)$parts[0];$name = $names[$opposingId] ?? 'no name';$title = sprintf('%s (%s)', $name, $info['currency_name']);$chartData[$title] = [@@ -422,12 +417,12 @@ class BudgetController extends Controllerreturn response()->json($cache->get()); // @codeCoverageIgnore}- $generator = app(FrontpageChartGenerator::class);- $generator->setUser(auth()->user());- $generator->setStart($start);- $generator->setEnd($end);+ $chartGenerator = app(FrontpageChartGenerator::class);+ $chartGenerator->setUser(auth()->user());+ $chartGenerator->setStart($start);+ $chartGenerator->setEnd($end);- $chartData = $generator->generate();+ $chartData = $chartGenerator->generate();$data = $this->generator->multiSet($chartData);$cache->store($data);@@ -463,14 +458,14 @@ class BudgetController extends Controller$preferredRange = app('navigation')->preferredRangeFormat($start, $end);$chartData = [[- 'label' => (string) trans('firefly.box_spent_in_currency', ['currency' => $currency->name]),+ 'label' => (string)trans('firefly.box_spent_in_currency', ['currency' => $currency->name]),'type' => 'bar','entries' => [],'currency_symbol' => $currency->symbol,'currency_code' => $currency->code,],[- 'label' => (string) trans('firefly.box_budgeted_in_currency', ['currency' => $currency->name]),+ 'label' => (string)trans('firefly.box_budgeted_in_currency', ['currency' => $currency->name]),'type' => 'bar','currency_symbol' => $currency->symbol,'currency_code' => $currency->code,@@ -549,7 +544,7 @@ class BudgetController extends Controller$currentStart = app('navigation')->addPeriod($currentStart, $preferredRange, 0);}- $data = $this->generator->singleSet((string) trans('firefly.spent'), $chartData);+ $data = $this->generator->singleSet((string)trans('firefly.spent'), $chartData);$cache->store($data);return response()->json($data);diff --git a/app/Http/Controllers/Chart/ExpenseReportController.php b/app/Http/Controllers/Chart/ExpenseReportController.phpindex 59d24800ca..e07391f2d7 100644--- a/app/Http/Controllers/Chart/ExpenseReportController.php+++ b/app/Http/Controllers/Chart/ExpenseReportController.php@@ -187,7 +187,7 @@ class ExpenseReportController extends Controller$newSet[$key] = $chartData[$key]; // @codeCoverageIgnore}}- if (0 === count($newSet)) {+ if (empty($newSet)) {$newSet = $chartData; // @codeCoverageIgnore}$data = $this->generator->multiSet($newSet);diff --git a/app/Http/Controllers/Json/BoxController.php b/app/Http/Controllers/Json/BoxController.phpindex 45f5c7bf18..13ef000073 100644--- a/app/Http/Controllers/Json/BoxController.php+++ b/app/Http/Controllers/Json/BoxController.php@@ -193,7 +193,7 @@ class BoxController extends Controller$incomes[$currencyId] = app('amount')->formatAnything($currency, $incomes[$currencyId] ?? '0', false);$expenses[$currencyId] = app('amount')->formatAnything($currency, $expenses[$currencyId] ?? '0', false);}- if (0 === count($sums)) {+ if (empty($sums)) {$currency = app('amount')->getDefaultCurrency();$sums[$currency->id] = app('amount')->formatAnything($currency, '0', false);$incomes[$currency->id] = app('amount')->formatAnything($currency, '0', false);@@ -257,7 +257,7 @@ class BoxController extends Controller$return = [];- foreach ($netWorthSet as $index => $data) {+ foreach ($netWorthSet as $data) {/** @var TransactionCurrency $currency */$currency = $data['currency'];$return[$currency->id] = app('amount')->formatAnything($currency, $data['balance'], false);diff --git a/app/Http/Controllers/Json/FrontpageController.php b/app/Http/Controllers/Json/FrontpageController.phpindex a4f0a89c20..6d69ccd1a0 100644--- a/app/Http/Controllers/Json/FrontpageController.php+++ b/app/Http/Controllers/Json/FrontpageController.php@@ -64,7 +64,7 @@ class FrontpageController extends Controller}}$html = '';- if (count($info) > 0) {+ if (!empty($info)) {try {$html = view('json.piggy-banks', compact('info'))->render();// @codeCoverageIgnoreStartdiff --git a/app/Http/Controllers/ObjectGroup/EditController.php b/app/Http/Controllers/ObjectGroup/EditController.phpindex 781b764eb8..174be3c4de 100644--- a/app/Http/Controllers/ObjectGroup/EditController.php+++ b/app/Http/Controllers/ObjectGroup/EditController.php@@ -67,8 +67,6 @@ class EditController extends Controller{$subTitle = (string) trans('firefly.edit_object_group', ['title' => $objectGroup->title]);$subTitleIcon = 'fa-pencil';- $targetDate = null;- $startDate = null;if (true !== session('object-groups.edit.fromUpdate')) {$this->rememberPreviousUri('object-groups.edit.uri');diff --git a/app/Http/Controllers/Report/BudgetController.php b/app/Http/Controllers/Report/BudgetController.phpindex 4ba5663d8c..a1d05fe4d2 100644--- a/app/Http/Controllers/Report/BudgetController.php+++ b/app/Http/Controllers/Report/BudgetController.php@@ -165,7 +165,6 @@ class BudgetController extends Controller$spent = $this->opsRepository->listExpenses($start, $end, $accounts, $budgets);$result = [];foreach ($spent as $currency) {- $currencyId = $currency['currency_id'];foreach ($currency['budgets'] as $budget) {foreach ($budget['transaction_journals'] as $journal) {$destinationId = $journal['destination_account_id'];@@ -328,7 +327,6 @@ class BudgetController extends Controllerforeach ($expenses as $currency) {foreach ($currency['budgets'] as $budget) {$count = 0;- $total = '0';foreach ($budget['transaction_journals'] as $journal) {$count++;$key = sprintf('%d-%d', $budget['id'], $currency['currency_id']);@@ -377,7 +375,6 @@ class BudgetController extends Controller$spent = $this->opsRepository->listExpenses($start, $end, $accounts, $budgets);$result = [];foreach ($spent as $currency) {- $currencyId = $currency['currency_id'];foreach ($currency['budgets'] as $budget) {foreach ($budget['transaction_journals'] as $journal) {$result[] = [diff --git a/app/Http/Controllers/Report/TagController.php b/app/Http/Controllers/Report/TagController.phpindex ccba00cc66..e5b57fe2c4 100644--- a/app/Http/Controllers/Report/TagController.php+++ b/app/Http/Controllers/Report/TagController.php@@ -40,10 +40,7 @@ use Throwable;*/class TagController extends Controller{--- /** @var OperationsRepositoryInterface */- private $opsRepository;+ private OperationsRepositoryInterface $opsRepository;/*** ExpenseReportController constructor.@@ -282,7 +279,6 @@ class TagController extends Controller$spent = $this->opsRepository->listExpenses($start, $end, $accounts, $tags);$result = [];foreach ($spent as $currency) {- $currencyId = $currency['currency_id'];foreach ($currency['tags'] as $tag) {foreach ($tag['transaction_journals'] as $journal) {$destinationId = $journal['destination_account_id'];@@ -335,7 +331,6 @@ class TagController extends Controller$spent = $this->opsRepository->listIncome($start, $end, $accounts, $tags);$result = [];foreach ($spent as $currency) {- $currencyId = $currency['currency_id'];foreach ($currency['tags'] as $tag) {foreach ($tag['transaction_journals'] as $journal) {$sourceId = $journal['source_account_id'];@@ -496,7 +491,6 @@ class TagController extends Controller$spent = $this->opsRepository->listExpenses($start, $end, $accounts, $tags);$result = [];foreach ($spent as $currency) {- $currencyId = $currency['currency_id'];foreach ($currency['tags'] as $tag) {foreach ($tag['transaction_journals'] as $journal) {$result[] = [@@ -546,7 +540,6 @@ class TagController extends Controller$spent = $this->opsRepository->listIncome($start, $end, $accounts, $tags);$result = [];foreach ($spent as $currency) {- $currencyId = $currency['currency_id'];foreach ($currency['tags'] as $tag) {foreach ($tag['transaction_journals'] as $journal) {$result[] = [diff --git a/app/Http/Controllers/Transaction/ConvertController.php b/app/Http/Controllers/Transaction/ConvertController.phpindex a551b1fa51..9556096bd0 100644--- a/app/Http/Controllers/Transaction/ConvertController.php+++ b/app/Http/Controllers/Transaction/ConvertController.php@@ -242,17 +242,15 @@ class ConvertController extends Controllerprivate function getAssetAccounts(): array{// make repositories- /** @var AccountRepositoryInterface $accountRepository */- $accountRepository = app(AccountRepositoryInterface::class);- $accountList = $accountRepository->getActiveAccountsByType([AccountType::ASSET]);+ $accountList = $this->accountRepository->getActiveAccountsByType([AccountType::ASSET]);$defaultCurrency = app('amount')->getDefaultCurrency();$grouped = [];// group accounts:/** @var Account $account */foreach ($accountList as $account) {$balance = app('steam')->balance($account, today());- $currency = $accountRepository->getAccountCurrency($account) ?? $defaultCurrency;- $role = (string)$accountRepository->getMetaValue($account, 'account_role');+ $currency = $this->accountRepository->getAccountCurrency($account) ?? $defaultCurrency;+ $role = (string)$this->accountRepository->getMetaValue($account, 'account_role');if ('' === $role) {$role = 'no_account_type'; // @codeCoverageIgnore}@@ -271,16 +269,14 @@ class ConvertController extends Controllerprivate function getLiabilities(): array{// make repositories- /** @var AccountRepositoryInterface $accountRepository */- $accountRepository = app(AccountRepositoryInterface::class);- $accountList = $accountRepository->getActiveAccountsByType([AccountType::LOAN, AccountType::DEBT, AccountType::MORTGAGE]);+ $accountList = $this->accountRepository->getActiveAccountsByType([AccountType::LOAN, AccountType::DEBT, AccountType::MORTGAGE]);$defaultCurrency = app('amount')->getDefaultCurrency();$grouped = [];// group accounts:/** @var Account $account */foreach ($accountList as $account) {$balance = app('steam')->balance($account, today());- $currency = $accountRepository->getAccountCurrency($account) ?? $defaultCurrency;+ $currency = $this->accountRepository->getAccountCurrency($account) ?? $defaultCurrency;$role = 'l_' . $account->accountType->type;$key = (string)trans('firefly.opt_group_' . $role);$grouped[$key][$account->id] = $account->name . ' (' . app('amount')->formatAnything($currency, $balance, false) . ')';@@ -295,16 +291,14 @@ class ConvertController extends Controllerprivate function getValidDepositSources(): array{// make repositories- /** @var AccountRepositoryInterface $accountRepository */- $accountRepository = app(AccountRepositoryInterface::class);$liabilityTypes = [AccountType::MORTGAGE, AccountType::DEBT, AccountType::CREDITCARD, AccountType::LOAN];- $accountList = $accountRepository+ $accountList = $this->accountRepository->getActiveAccountsByType([AccountType::REVENUE, AccountType::CASH, AccountType::LOAN, AccountType::DEBT, AccountType::MORTGAGE]);$grouped = [];// group accounts:/** @var Account $account */foreach ($accountList as $account) {- $role = (string)$accountRepository->getMetaValue($account, 'account_role');+ $role = (string)$this->accountRepository->getMetaValue($account, 'account_role');$name = $account->name;if ('' === $role) {$role = 'no_account_type'; // @codeCoverageIgnore@@ -337,17 +331,15 @@ class ConvertController extends Controllerprivate function getValidWithdrawalDests(): array{// make repositories- /** @var AccountRepositoryInterface $accountRepository */- $accountRepository = app(AccountRepositoryInterface::class);$liabilityTypes = [AccountType::MORTGAGE, AccountType::DEBT, AccountType::CREDITCARD, AccountType::LOAN];- $accountList = $accountRepository->getActiveAccountsByType(+ $accountList = $this->accountRepository->getActiveAccountsByType([AccountType::EXPENSE, AccountType::CASH, AccountType::LOAN, AccountType::DEBT, AccountType::MORTGAGE]);$grouped = [];// group accounts:/** @var Account $account */foreach ($accountList as $account) {- $role = (string)$accountRepository->getMetaValue($account, 'account_role');+ $role = (string)$this->accountRepository->getMetaValue($account, 'account_role');$name = $account->name;if ('' === $role) {$role = 'no_account_type'; // @codeCoverageIgnorediff --git a/app/Http/Controllers/Transaction/ShowController.php b/app/Http/Controllers/Transaction/ShowController.phpindex 5dae4c354e..9f3d1fba6f 100644--- a/app/Http/Controllers/Transaction/ShowController.php+++ b/app/Http/Controllers/Transaction/ShowController.php@@ -171,7 +171,7 @@ class ShowController extends Controller{$accounts = [];- foreach ($group['transactions'] as $index => $transaction) {+ foreach ($group['transactions'] as $transaction) {$accounts['source'][] = ['type' => $transaction['source_type'],'id' => $transaction['source_id'],diff --git a/app/Jobs/CreateRecurringTransactions.php b/app/Jobs/CreateRecurringTransactions.phpindex f32b998992..c982deb974 100644--- a/app/Jobs/CreateRecurringTransactions.php+++ b/app/Jobs/CreateRecurringTransactions.php@@ -354,17 +354,7 @@ class CreateRecurringTransactions implements ShouldQueue$includeWeekend = clone $this->date;$includeWeekend->addDays(2);$occurrences = $this->repository->getOccurrencesInRange($repetition, $recurrence->first_date, $includeWeekend);- /*- Log::debug(- sprintf(- 'Calculated %d occurrences between %s and %s',- count($occurrences),- $recurrence->first_date->format('Y-m-d'),- $includeWeekend->format('Y-m-d')- ),- $this->debugArray($occurrences)- );- */+unset($includeWeekend);$result = $this->handleOccurrences($recurrence, $repetition, $occurrences);diff --git a/app/Mail/ReportNewJournalsMail.php b/app/Mail/ReportNewJournalsMail.phpindex a72321dd0c..3956773a3c 100644--- a/app/Mail/ReportNewJournalsMail.php+++ b/app/Mail/ReportNewJournalsMail.php@@ -70,12 +70,6 @@ class ReportNewJournalsMail extends Mailable*/public function build(): self{- $subject = 1 === $this->groups->count()- ? 'Firefly III has created a new transaction'- : sprintf(- 'Firefly III has created new %d transactions',- $this->groups->count()- );$this->transform();return $this->view('emails.report-new-journals-html')->text('emails.report-new-journals-text')diff --git a/app/Models/TransactionJournal.php b/app/Models/TransactionJournal.phpindex 74e548e7c7..01f2892338 100644--- a/app/Models/TransactionJournal.php+++ b/app/Models/TransactionJournal.php@@ -355,7 +355,7 @@ class TransactionJournal extends Modelif (!self::isJoined($query, 'transaction_types')) {$query->leftJoin('transaction_types', 'transaction_types.id', '=', 'transaction_journals.transaction_type_id');}- if (count($types) > 0) {+ if (!empty($types)) {$query->whereIn('transaction_types.type', $types);}}diff --git a/app/Repositories/Account/AccountRepository.php b/app/Repositories/Account/AccountRepository.phpindex 9ed7621f5d..39cdb83eb1 100644--- a/app/Repositories/Account/AccountRepository.php+++ b/app/Repositories/Account/AccountRepository.php@@ -128,7 +128,7 @@ class AccountRepository implements AccountRepositoryInterface->where('account_meta.name', 'account_number')->where('account_meta.data', json_encode($number));- if (count($types) > 0) {+ if (!empty($types)) {$query->leftJoin('account_types', 'accounts.account_type_id', '=', 'account_types.id');$query->whereIn('account_types.type', $types);}@@ -152,7 +152,7 @@ class AccountRepository implements AccountRepositoryInterface{$query = $this->user->accounts()->where('iban', '!=', '')->whereNotNull('iban');- if (count($types) > 0) {+ if (!empty($types)) {$query->leftJoin('account_types', 'accounts.account_type_id', '=', 'account_types.id');$query->whereIn('account_types.type', $types);}@@ -180,7 +180,7 @@ class AccountRepository implements AccountRepositoryInterface{$query = $this->user->accounts();- if (count($types) > 0) {+ if (!empty($types)) {$query->leftJoin('account_types', 'accounts.account_type_id', '=', 'account_types.id');$query->whereIn('account_types.type', $types);}@@ -260,7 +260,7 @@ class AccountRepository implements AccountRepositoryInterface/** @var Collection $result */$query = $this->user->accounts();- if (count($accountIds) > 0) {+ if (!empty($accountIds)) {$query->whereIn('accounts.id', $accountIds);}$query->orderBy('accounts.order', 'ASC');@@ -279,7 +279,7 @@ class AccountRepository implements AccountRepositoryInterface{/** @var Collection $result */$query = $this->user->accounts();- if (count($types) > 0) {+ if (!empty($types)) {$query->accountTypeIn($types);}$query->orderBy('accounts.order', 'ASC');@@ -303,7 +303,7 @@ class AccountRepository implements AccountRepositoryInterface$query->where('name', 'account_role');}, 'attachments']);- if (count($types) > 0) {+ if (!empty($types)) {$query->accountTypeIn($types);}$query->where('active', 1);@@ -572,7 +572,7 @@ class AccountRepository implements AccountRepositoryInterface}}- if (count($types) > 0) {+ if (!empty($types)) {$dbQuery->leftJoin('account_types', 'accounts.account_type_id', '=', 'account_types.id');$dbQuery->whereIn('account_types.type', $types);}@@ -630,7 +630,7 @@ class AccountRepository implements AccountRepositoryInterface$query->where('name', 'account_role');}]);- if (count($types) > 0) {+ if (!empty($types)) {$query->accountTypeIn($types);}$query->where('active', 0);@@ -728,7 +728,7 @@ class AccountRepository implements AccountRepositoryInterface});}}- if (count($types) > 0) {+ if (!empty($types)) {$dbQuery->leftJoin('account_types', 'accounts.account_type_id', '=', 'account_types.id');$dbQuery->whereIn('account_types.type', $types);}diff --git a/app/Repositories/Budget/BudgetRepository.php b/app/Repositories/Budget/BudgetRepository.phpindex 200cc527e4..aee88db882 100644--- a/app/Repositories/Budget/BudgetRepository.php+++ b/app/Repositories/Budget/BudgetRepository.php@@ -157,7 +157,6 @@ class BudgetRepository implements BudgetRepositoryInterface*/public function firstUseDate(Budget $budget): ?Carbon{- $oldest = null;$journal = $budget->transactionJournals()->orderBy('date', 'ASC')->first();if (null !== $journal) {return $journal->date;diff --git a/app/Repositories/Journal/JournalRepository.php b/app/Repositories/Journal/JournalRepository.phpindex 0fad9319f9..34b8d8fbd0 100644--- a/app/Repositories/Journal/JournalRepository.php+++ b/app/Repositories/Journal/JournalRepository.php@@ -215,7 +215,6 @@ class JournalRepository implements JournalRepositoryInterface*/public function getLinkNoteText(TransactionJournalLink $link): string{- $notes = null;/** @var Note $note */$note = $link->notes()->first();if (null !== $note) {diff --git a/app/Repositories/ObjectGroup/CreatesObjectGroups.php b/app/Repositories/ObjectGroup/CreatesObjectGroups.phpindex 9abf2f1d4d..5fd1ad3bb5 100644--- a/app/Repositories/ObjectGroup/CreatesObjectGroups.php+++ b/app/Repositories/ObjectGroup/CreatesObjectGroups.php@@ -60,7 +60,6 @@ trait CreatesObjectGroups*/protected function findOrCreateObjectGroup(string $title): ?ObjectGroup{- $group = null;$maxOrder = $this->getObjectGroupMaxOrder();if (!$this->hasObjectGroup($title)) {return ObjectGroup::create(diff --git a/app/Repositories/Recurring/RecurringRepository.php b/app/Repositories/Recurring/RecurringRepository.phpindex 54d26835f3..97671ed50e 100644--- a/app/Repositories/Recurring/RecurringRepository.php+++ b/app/Repositories/Recurring/RecurringRepository.php@@ -327,7 +327,7 @@ class RecurringRepository implements RecurringRepositoryInterfaceforeach ($journalMeta as $journalId) {$search[] = (int)$journalId;}- if (0 === count($search)) {+ if (empty($search)) {return new Collection;}diff --git a/app/Repositories/Tag/TagRepository.php b/app/Repositories/Tag/TagRepository.phpindex b8f66ebbcb..9a4bea8c89 100644--- a/app/Repositories/Tag/TagRepository.php+++ b/app/Repositories/Tag/TagRepository.php@@ -476,7 +476,6 @@ class TagRepository implements TagRepositoryInterface*/public function update(Tag $tag, array $data): Tag{- $oldTag = $data['tag'];$tag->tag = $data['tag'];$tag->date = $data['date'];$tag->description = $data['description'];diff --git a/app/Services/Internal/Support/RecurringTransactionTrait.php b/app/Services/Internal/Support/RecurringTransactionTrait.phpindex 5d462d2bee..4c2c727f9e 100644--- a/app/Services/Internal/Support/RecurringTransactionTrait.php+++ b/app/Services/Internal/Support/RecurringTransactionTrait.php@@ -275,7 +275,7 @@ trait RecurringTransactionTrait*/protected function updateTags(RecurrenceTransaction $transaction, array $tags): void{- if (count($tags) > 0) {+ if (!empty($tags)) {/** @var RecurrenceMeta $entry */$entry = $transaction->recurrenceTransactionMeta()->where('name', 'tags')->first();if (null === $entry) {@@ -284,7 +284,7 @@ trait RecurringTransactionTrait$entry->value = json_encode($tags);$entry->save();}- if (0 === count($tags)) {+ if (empty($tags)) {// delete if present$transaction->recurrenceTransactionMeta()->where('name', 'tags')->delete();}diff --git a/app/Services/Internal/Update/JournalUpdateService.php b/app/Services/Internal/Update/JournalUpdateService.phpindex b357652e97..d6e0efee8f 100644--- a/app/Services/Internal/Update/JournalUpdateService.php+++ b/app/Services/Internal/Update/JournalUpdateService.php@@ -76,10 +76,6 @@ class JournalUpdateServiceprivate $transactionGroup;/** @var TransactionJournal The journal to update. */private $transactionJournal;- /** @var Account If new account info is submitted, this array will hold the valid destination. */- private $validDestination;- /** @var Account If new account info is submitted, this array will hold the valid source. */- private $validSource;/*** JournalUpdateService constructor.diff --git a/app/Services/Internal/Update/RecurrenceUpdateService.php b/app/Services/Internal/Update/RecurrenceUpdateService.phpindex a45d680264..775bb79c7d 100644--- a/app/Services/Internal/Update/RecurrenceUpdateService.php+++ b/app/Services/Internal/Update/RecurrenceUpdateService.php@@ -41,8 +41,7 @@ class RecurrenceUpdateService{use TransactionTypeTrait, RecurringTransactionTrait;- /** @var User */- private $user;+ private User $user;/*** Updates a recurrence.@@ -99,7 +98,7 @@ class RecurrenceUpdateService$this->createRepetitions($recurrence, $data['repetitions'] ?? []);}- // update all transactions (and associated meta-data);+ // update all transactions (and associated meta-data)if (null !== $data['transactions']) {$this->deleteTransactions($recurrence);$this->createTransactions($recurrence, $data['transactions'] ?? []);diff --git a/app/Support/Chart/Category/WholePeriodChartGenerator.php b/app/Support/Chart/Category/WholePeriodChartGenerator.phpindex 86288f893c..d7149e93d9 100644--- a/app/Support/Chart/Category/WholePeriodChartGenerator.php+++ b/app/Support/Chart/Category/WholePeriodChartGenerator.php@@ -57,8 +57,6 @@ class WholePeriodChartGeneratorpublic function generate(Category $category, Carbon $start, Carbon $end): array{$collection = new Collection([$category]);- /** @var CategoryRepositoryInterface $repository */- $repository = app(CategoryRepositoryInterface::class);/** @var OperationsRepositoryInterface $opsRepository */$opsRepository = app(OperationsRepositoryInterface::class);diff --git a/app/Support/Export/ExportDataGenerator.php b/app/Support/Export/ExportDataGenerator.phpindex 5e9e0308e6..e2afd63627 100644--- a/app/Support/Export/ExportDataGenerator.php+++ b/app/Support/Export/ExportDataGenerator.php@@ -717,7 +717,7 @@ class ExportDataGenerator*/private function mergeTags(array $tags): string{- if (0 === count($tags)) {+ if (empty($tags)) {return '';}$smol = [];diff --git a/app/Support/Http/Controllers/RequestInformation.php b/app/Support/Http/Controllers/RequestInformation.phpindex 46f8689665..32f3167c0b 100644--- a/app/Support/Http/Controllers/RequestInformation.php+++ b/app/Support/Http/Controllers/RequestInformation.php@@ -129,7 +129,7 @@ trait RequestInformation$triggers = [];$data = $request->get('triggers');if (is_array($data)) {- foreach ($data as $index => $triggerInfo) {+ foreach ($data as $triggerInfo) {$triggers[] = ['type' => $triggerInfo['type'] ?? '','value' => $triggerInfo['value'] ?? '',diff --git a/app/Support/Report/Budget/BudgetReportGenerator.php b/app/Support/Report/Budget/BudgetReportGenerator.phpindex e2b9205208..b2d900bc9b 100644--- a/app/Support/Report/Budget/BudgetReportGenerator.php+++ b/app/Support/Report/Budget/BudgetReportGenerator.php@@ -154,9 +154,9 @@ class BudgetReportGenerator*/private function generalBudgetReport(): void{- $budgets = $this->repository->getBudgets();+ $budgetList = $this->repository->getBudgets();/** @var Budget $budget */- foreach ($budgets as $budget) {+ foreach ($budgetList as $budget) {$this->processBudget($budget);}}@@ -192,14 +192,14 @@ class BudgetReportGenerator*/private function processLimit(Budget $budget, BudgetLimit $limit): void{- $budgetId = (int)$budget->id;- $limitId = (int)$limit->id;- $currency = $limit->transactionCurrency ?? $this->currency;- $currencyId = (int)$currency->id;- $expenses = $this->opsRepository->sumExpenses($limit->start_date, $limit->end_date, $this->accounts, new Collection([$budget]));- $spent = $expenses[$currencyId]['sum'] ?? '0';- $left = -1 === bccomp(bcadd($limit->amount, $spent), '0') ? '0' : bcadd($limit->amount, $spent);- $overspent = 1 === bccomp(bcmul($spent, '-1'), $limit->amount) ? bcadd($spent, $limit->amount) : '0';+ $budgetId = (int)$budget->id;+ $limitId = (int)$limit->id;+ $limitCurrency = $limit->transactionCurrency ?? $this->currency;+ $currencyId = (int)$limitCurrency->id;+ $expenses = $this->opsRepository->sumExpenses($limit->start_date, $limit->end_date, $this->accounts, new Collection([$budget]));+ $spent = $expenses[$currencyId]['sum'] ?? '0';+ $left = -1 === bccomp(bcadd($limit->amount, $spent), '0') ? '0' : bcadd($limit->amount, $spent);+ $overspent = 1 === bccomp(bcmul($spent, '-1'), $limit->amount) ? bcadd($spent, $limit->amount) : '0';$this->report['budgets'][$budgetId]['budget_limits'][$limitId] = $this->report['budgets'][$budgetId]['budget_limits'][$limitId] ?? ['budget_limit_id' => $limitId,@@ -212,10 +212,10 @@ class BudgetReportGenerator'left' => $left,'overspent' => $overspent,'currency_id' => $currencyId,- 'currency_code' => $currency->code,- 'currency_name' => $currency->name,- 'currency_symbol' => $currency->symbol,- 'currency_decimal_places' => $currency->decimal_places,+ 'currency_code' => $limitCurrency->code,+ 'currency_name' => $limitCurrency->name,+ 'currency_symbol' => $limitCurrency->symbol,+ 'currency_decimal_places' => $limitCurrency->decimal_places,];// make sum information:@@ -226,10 +226,10 @@ class BudgetReportGenerator'left' => '0','overspent' => '0','currency_id' => $currencyId,- 'currency_code' => $currency->code,- 'currency_name' => $currency->name,- 'currency_symbol' => $currency->symbol,- 'currency_decimal_places' => $currency->decimal_places,+ 'currency_code' => $limitCurrency->code,+ 'currency_name' => $limitCurrency->name,+ 'currency_symbol' => $limitCurrency->symbol,+ 'currency_decimal_places' => $limitCurrency->decimal_places,];$this->report['sums'][$currencyId]['budgeted'] = bcadd($this->report['sums'][$currencyId]['budgeted'], $limit->amount);$this->report['sums'][$currencyId]['spent'] = bcadd($this->report['sums'][$currencyId]['spent'], $spent);diff --git a/database/factories/OBFactory.php b/database/factories/OBFactory.phpindex 087be2daca..899718a71f 100644--- a/database/factories/OBFactory.php+++ b/database/factories/OBFactory.php@@ -36,14 +36,14 @@ $factory->state(TransactionJournal::class, 'ob_broken', function ($faker) {$factory->afterCreatingState(TransactionJournal::class, TransactionType::OPENING_BALANCE, function ($journal, $faker) {$obAccount = factory(Account::class)->state(AccountType::INITIAL_BALANCE)->create();$assetAccount = factory(Account::class)->state(AccountType::ASSET)->create();- $sourceTransaction = factory(Transaction::class)->create(+ factory(Transaction::class)->create(['account_id' => $obAccount->id,'transaction_journal_id' => $journal->id,'amount' => '5',]);- $destTransaction = factory(Transaction::class)->create(+ factory(Transaction::class)->create(['account_id' => $assetAccount->id,'transaction_journal_id' => $journal->id,@@ -55,14 +55,14 @@ $factory->afterCreatingState(TransactionJournal::class, 'ob_broken', function ($$ob1 = factory(Account::class)->state(AccountType::INITIAL_BALANCE)->create();$ob2 = factory(Account::class)->state(AccountType::INITIAL_BALANCE)->create();- $sourceTransaction = factory(Transaction::class)->create(+ factory(Transaction::class)->create(['account_id' => $ob1->id,'transaction_journal_id' => $journal->id,'amount' => '5',]);- $destTransaction = factory(Transaction::class)->create(+ factory(Transaction::class)->create(['account_id' => $ob2->id,'transaction_journal_id' => $journal->id,diff --git a/resources/assets/js/components/profile/ProfileOptions.vue b/resources/assets/js/components/profile/ProfileOptions.vueindex de711c631e..4f8ad9ada7 100644--- a/resources/assets/js/components/profile/ProfileOptions.vue+++ b/resources/assets/js/components/profile/ProfileOptions.vue@@ -43,7 +43,3 @@ export default {name: "ProfileOptions"}</script>--<style scoped>--</style>\ No newline at end of filediff --git a/resources/assets/js/components/transactions/AccountSelect.vue b/resources/assets/js/components/transactions/AccountSelect.vueindex 057641da83..3c4be1d80d 100644--- a/resources/assets/js/components/transactions/AccountSelect.vue+++ b/resources/assets/js/components/transactions/AccountSelect.vue@@ -245,7 +245,3 @@ export default {}}</script>--<style scoped>--</style>diff --git a/resources/assets/js/components/transactions/Amount.vue b/resources/assets/js/components/transactions/Amount.vueindex 3493074279..c4975c9914 100644--- a/resources/assets/js/components/transactions/Amount.vue+++ b/resources/assets/js/components/transactions/Amount.vue@@ -151,7 +151,3 @@ export default {}}</script>--<style scoped>--</style>\ No newline at end of filediff --git a/resources/assets/js/components/transactions/Bill.vue b/resources/assets/js/components/transactions/Bill.vueindex cda8bea01e..d1f8b5d60c 100644--- a/resources/assets/js/components/transactions/Bill.vue+++ b/resources/assets/js/components/transactions/Bill.vue@@ -106,7 +106,3 @@ export default {}}</script>--<style scoped>--</style>diff --git a/resources/assets/js/components/transactions/Budget.vue b/resources/assets/js/components/transactions/Budget.vueindex cd4983921b..3086196c93 100644--- a/resources/assets/js/components/transactions/Budget.vue+++ b/resources/assets/js/components/transactions/Budget.vue@@ -105,7 +105,3 @@ export default {}}</script>--<style scoped>--</style>diff --git a/resources/assets/js/components/transactions/Category.vue b/resources/assets/js/components/transactions/Category.vueindex 20d92e0113..ad08719619 100644--- a/resources/assets/js/components/transactions/Category.vue+++ b/resources/assets/js/components/transactions/Category.vue@@ -168,7 +168,3 @@ export default {}}</script>--<style scoped>--</style>diff --git a/resources/assets/js/components/transactions/CustomDate.vue b/resources/assets/js/components/transactions/CustomDate.vueindex c279dd057e..b15acc2d91 100644--- a/resources/assets/js/components/transactions/CustomDate.vue+++ b/resources/assets/js/components/transactions/CustomDate.vue@@ -72,7 +72,3 @@ export default {}}</script>--<style scoped>--</style>\ No newline at end of filediff --git a/resources/assets/js/components/transactions/CustomString.vue b/resources/assets/js/components/transactions/CustomString.vueindex 012d62ae46..f08f943a6f 100644--- a/resources/assets/js/components/transactions/CustomString.vue+++ b/resources/assets/js/components/transactions/CustomString.vue@@ -72,7 +72,3 @@ export default {}}</script>--<style scoped>--</style>\ No newline at end of filediff --git a/resources/assets/js/components/transactions/CustomTransactionFields.vue b/resources/assets/js/components/transactions/CustomTransactionFields.vueindex ddd6d08383..2382d7ceb0 100644--- a/resources/assets/js/components/transactions/CustomTransactionFields.vue+++ b/resources/assets/js/components/transactions/CustomTransactionFields.vue@@ -131,7 +131,3 @@ export default {}}</script>--<style scoped>--</style>diff --git a/resources/assets/js/components/transactions/CustomUri.vue b/resources/assets/js/components/transactions/CustomUri.vueindex 2ee11ba598..2fdac5b62b 100644--- a/resources/assets/js/components/transactions/CustomUri.vue+++ b/resources/assets/js/components/transactions/CustomUri.vue@@ -71,7 +71,3 @@ export default {}}</script>--<style scoped>--</style>diff --git a/resources/assets/js/components/transactions/EditTransaction.vue b/resources/assets/js/components/transactions/EditTransaction.vueindex 1f0e1c4d5e..adb024ab63 100644--- a/resources/assets/js/components/transactions/EditTransaction.vue+++ b/resources/assets/js/components/transactions/EditTransaction.vue@@ -1046,7 +1046,3 @@ export default {}}</script>--<style scoped>--</style>diff --git a/resources/assets/js/components/transactions/ForeignAmountSelect.vue b/resources/assets/js/components/transactions/ForeignAmountSelect.vueindex 8ba34201f5..3fae76b307 100644--- a/resources/assets/js/components/transactions/ForeignAmountSelect.vue+++ b/resources/assets/js/components/transactions/ForeignAmountSelect.vue@@ -213,7 +213,3 @@ export default {}}</script>--<style scoped>--</style>diff --git a/resources/assets/js/components/transactions/GroupDescription.vue b/resources/assets/js/components/transactions/GroupDescription.vueindex 8abda3461e..a7f87529fb 100644--- a/resources/assets/js/components/transactions/GroupDescription.vue+++ b/resources/assets/js/components/transactions/GroupDescription.vue@@ -73,7 +73,3 @@ export default {}}</script>--<style scoped>--</style>\ No newline at end of filediff --git a/resources/assets/js/components/transactions/PiggyBank.vue b/resources/assets/js/components/transactions/PiggyBank.vueindex 4100bfab8d..14585aee65 100644--- a/resources/assets/js/components/transactions/PiggyBank.vue+++ b/resources/assets/js/components/transactions/PiggyBank.vue@@ -116,7 +116,3 @@ export default {}}</script>--<style scoped>--</style>diff --git a/resources/assets/js/components/transactions/StandardDate.vue b/resources/assets/js/components/transactions/StandardDate.vueindex 169413cff6..20177c3a96 100644--- a/resources/assets/js/components/transactions/StandardDate.vue+++ b/resources/assets/js/components/transactions/StandardDate.vue@@ -75,7 +75,3 @@ export default {}}</script>--<style scoped>--</style>\ No newline at end of filediff --git a/resources/assets/js/components/transactions/Tags.vue b/resources/assets/js/components/transactions/Tags.vueindex f6d3b93066..949cd90baf 100644--- a/resources/assets/js/components/transactions/Tags.vue+++ b/resources/assets/js/components/transactions/Tags.vue@@ -105,7 +105,3 @@ export default {},}</script>--<style scoped>--</style>diff --git a/resources/assets/js/components/transactions/TransactionDescription.vue b/resources/assets/js/components/transactions/TransactionDescription.vueindex 05ed213c3a..4808a7171f 100644--- a/resources/assets/js/components/transactions/TransactionDescription.vue+++ b/resources/assets/js/components/transactions/TransactionDescription.vue@@ -155,7 +155,3 @@ export default {}}</script>--<style scoped>--</style>diff --git a/resources/assets/js/components/transactions/TransactionType.vue b/resources/assets/js/components/transactions/TransactionType.vueindex eadaf16c0b..f49bdea9e5 100644--- a/resources/assets/js/components/transactions/TransactionType.vue+++ b/resources/assets/js/components/transactions/TransactionType.vue@@ -84,7 +84,3 @@ export default {name: "TransactionType"}</script>--<style scoped>--</style>\ No newline at end of filediff --git a/resources/views/v1/layout/default.twig b/resources/views/v1/layout/default.twigindex 3b27cbf23b..7e3f1d340c 100644--- a/resources/views/v1/layout/default.twig+++ b/resources/views/v1/layout/default.twig@@ -176,7 +176,7 @@{# Moment JS #}<script src="v1/js/lib/moment.min.js?v={{ FF_VERSION }}" type="text/javascript" nonce="{{ JS_NONCE }}"></script>-<script src="v1/js/ff/moment/{{ language }}.js?v={{ FF_VERSION }}" type="text/javascript" nonce="{{ JS_NONCE }}"></script>+<script src="v1/js/lib/moment/{{ language }}.js?v={{ FF_VERSION }}" type="text/javascript" nonce="{{ JS_NONCE }}"></script>{# All kinds of variables. #}<script src="{{ route('javascript.variables') }}?ext=.js&v={{ FF_VERSION }}{% if account %}&account={{ account.id }}{% endif %}" type="text/javascript" nonce="{{ JS_NONCE }}"></script>diff --git a/routes/breadcrumbs.php b/routes/breadcrumbs.phpindex 28bca96e09..2121ef2a93 100644--- a/routes/breadcrumbs.php+++ b/routes/breadcrumbs.php@@ -1143,7 +1143,7 @@ try {Breadcrumbs::register('transactions.mass.edit',static function (BreadcrumbsGenerator $breadcrumbs, array $journals): void {- if (count($journals) > 0) {+ if (!empty($journals)) {$objectType = strtolower(reset($journals)['transaction_type_type']);$breadcrumbs->parent('transactions.index', $objectType);$breadcrumbs->push(trans('firefly.mass_edit_journals'), route('transactions.mass.edit', ['']));@@ -1167,7 +1167,7 @@ try {Breadcrumbs::register('transactions.bulk.edit',static function (BreadcrumbsGenerator $breadcrumbs, array $journals): void {- if (count($journals) > 0) {+ if (!empty($journals)) {$ids = Arr::pluck($journals, 'transaction_journal_id');$first = reset($journals);$breadcrumbs->parent('transactions.index', strtolower($first['transaction_type_type']));diff --git a/tests/Feature/Console/Commands/Correction/CorrectOpeningBalanceCurrenciesTest.php b/tests/Feature/Console/Commands/Correction/CorrectOpeningBalanceCurrenciesTest.phpindex f9bdb24f1a..64ad12dc22 100644--- a/tests/Feature/Console/Commands/Correction/CorrectOpeningBalanceCurrenciesTest.php+++ b/tests/Feature/Console/Commands/Correction/CorrectOpeningBalanceCurrenciesTest.php@@ -59,7 +59,7 @@ class CorrectOpeningBalanceCurrenciesTest extends TestCasepublic function testHandleBroken(): void{// create opening balance journal for test. Is enough to trigger this test.- $journal = factory(TransactionJournal::class)->state(TransactionType::OPENING_BALANCE)->create();+ factory(TransactionJournal::class)->state(TransactionType::OPENING_BALANCE)->create();// run command$this->artisan('firefly-iii:fix-ob-currencies')diff --git a/tests/Feature/Console/Commands/Correction/FixAccountTypesTest.php b/tests/Feature/Console/Commands/Correction/FixAccountTypesTest.phpindex 336264486a..b31196a4f6 100644--- a/tests/Feature/Console/Commands/Correction/FixAccountTypesTest.php+++ b/tests/Feature/Console/Commands/Correction/FixAccountTypesTest.php@@ -300,7 +300,6 @@ class FixAccountTypesTest extends TestCase$newSource = $this->getRandomRevenue();$destination = $this->getRandomAsset();- $withdrawal = TransactionType::where('type', TransactionType::WITHDRAWAL)->first();$deposit = TransactionType::where('type', TransactionType::DEPOSIT)->first();$journal = TransactionJournal::create([diff --git a/tests/Feature/Console/Commands/Correction/FixTransactionTypesTest.php b/tests/Feature/Console/Commands/Correction/FixTransactionTypesTest.phpindex d88131e964..043be055fa 100644--- a/tests/Feature/Console/Commands/Correction/FixTransactionTypesTest.php+++ b/tests/Feature/Console/Commands/Correction/FixTransactionTypesTest.php@@ -34,14 +34,7 @@ class FixTransactionTypesTest extends TestCase*/public function testHandle(): void{---- $this->artisan('firefly-iii:fix-transaction-types')- ->expectsOutput(sprintf('Recurring transaction #%d should be a "%s" but is a "%s" and will be corrected.',- 1, 'Withdrawal','Transfer',- ))- ->assertExitCode(0);+ $this->markTestIncomplete();}diff --git a/tests/TestCase.php b/tests/TestCase.phpindex 677cb97e19..f292d1091f 100644--- a/tests/TestCase.php+++ b/tests/TestCase.php@@ -34,7 +34,7 @@ use Tests\Traits\TestHelpers;*/abstract class TestCase extends BaseTestCase{- use CreatesApplication, CollectsValues;//, MocksDefaultValues, TestHelpers, ;+ use CreatesApplication, CollectsValues; // MocksDefaultValues TestHelpers/*** @return array