Firefly III: a personal finances manager
PHP accountingbudgetbudgetingbudgetscash-flowcashflowcredit-carddockerexpensesfinancefinancesfinanciallinuxmoneypaycheckpersonal-financephpphp7
Remove TODO's.
James Cole8832387b8476
diff --git a/app/Api/V1/Controllers/Insight/Income/AccountController.php b/app/Api/V1/Controllers/Insight/Income/AccountController.phpindex 63e6db1f91..bd195662e2 100644--- a/app/Api/V1/Controllers/Insight/Income/AccountController.php+++ b/app/Api/V1/Controllers/Insight/Income/AccountController.php@@ -38,7 +38,7 @@ use Illuminate\Http\JsonResponse;** Shows income information grouped or limited by date.* Ie. all income grouped by account + currency.- * TODO same code as Expense/AccountController.+* See reference nr. 75*/class AccountController extends Controller{@@ -74,8 +74,8 @@ class AccountController extends Controller}/**- * TODO same code as Expense/AccountController.- * TODO does not actually include the name of the expense account.+* See reference nr. 76+* See reference nr. 77* @param GenericRequest $request** @return JsonResponse@@ -103,7 +103,7 @@ class AccountController extends Controller}/**- * TODO does not actually include the name of the expense account.+* See reference nr. 78** @param GenericRequest $request*diff --git a/app/Api/V1/Controllers/Insight/Income/CategoryController.php b/app/Api/V1/Controllers/Insight/Income/CategoryController.phpindex 8599ca28aa..69388c113e 100644--- a/app/Api/V1/Controllers/Insight/Income/CategoryController.php+++ b/app/Api/V1/Controllers/Insight/Income/CategoryController.php@@ -35,7 +35,7 @@ use Illuminate\Support\Collection;/*** Class CategoryController- * TODO same as opposing category controller+* See reference nr. 79*/class CategoryController extends Controller{diff --git a/app/Api/V1/Controllers/Insight/Transfer/AccountController.php b/app/Api/V1/Controllers/Insight/Transfer/AccountController.phpindex 3e70d564f8..e3239b578a 100644--- a/app/Api/V1/Controllers/Insight/Transfer/AccountController.php+++ b/app/Api/V1/Controllers/Insight/Transfer/AccountController.php@@ -58,8 +58,8 @@ class AccountController extends Controller}/**- * TODO same code as Expense/AccountController.- * TODO does not actually include the name of the expense account.+* See reference nr. 80+* See reference nr. 81** @param GenericRequest $request*diff --git a/app/Api/V1/Controllers/Insight/Transfer/TagController.php b/app/Api/V1/Controllers/Insight/Transfer/TagController.phpindex 6a9f765d8b..b0366d70d7 100644--- a/app/Api/V1/Controllers/Insight/Transfer/TagController.php+++ b/app/Api/V1/Controllers/Insight/Transfer/TagController.php@@ -39,7 +39,7 @@ class TagController extends Controller/*** TagController constructor.- * TODO lots of copying and pasting here.+* See reference nr. 82*/public function __construct(){diff --git a/app/Api/V1/Controllers/Models/TransactionLink/UpdateController.php b/app/Api/V1/Controllers/Models/TransactionLink/UpdateController.phpindex 6de8c8bd0e..140147105a 100644--- a/app/Api/V1/Controllers/Models/TransactionLink/UpdateController.php+++ b/app/Api/V1/Controllers/Models/TransactionLink/UpdateController.php@@ -72,7 +72,7 @@ class UpdateController extends Controller** @return JsonResponse*- * TODO generates query exception when link exists.+* See reference nr. 84*/public function update(UpdateRequest $request, TransactionJournalLink $journalLink): JsonResponse{diff --git a/app/Api/V1/Controllers/User/PreferencesController.php b/app/Api/V1/Controllers/User/PreferencesController.phpindex 32d7921130..a0223f95df 100644--- a/app/Api/V1/Controllers/User/PreferencesController.php+++ b/app/Api/V1/Controllers/User/PreferencesController.php@@ -52,7 +52,7 @@ class PreferencesController extends Controller*/public function index(): JsonResponse{- // TODO via repository.+// See reference nr. 83$collection = auth()->user()->preferences()->get();$manager = $this->getManager();$count = $collection->count();diff --git a/app/Api/V1/Requests/Data/Bulk/MoveTransactionsRequest.php b/app/Api/V1/Requests/Data/Bulk/MoveTransactionsRequest.phpindex 6c036b7648..37ae4d55b2 100644--- a/app/Api/V1/Requests/Data/Bulk/MoveTransactionsRequest.php+++ b/app/Api/V1/Requests/Data/Bulk/MoveTransactionsRequest.php@@ -42,7 +42,7 @@ class MoveTransactionsRequest extends FormRequest* Configure the validator instance with special rules for after the basic validation rules.** @param Validator $validator- * TODO duplicate code.+* See reference nr. 74** @return void*/diff --git a/app/Api/V1/Requests/Models/BudgetLimit/UpdateRequest.php b/app/Api/V1/Requests/Models/BudgetLimit/UpdateRequest.phpindex 019a849e80..ff54dbb91e 100644--- a/app/Api/V1/Requests/Models/BudgetLimit/UpdateRequest.php+++ b/app/Api/V1/Requests/Models/BudgetLimit/UpdateRequest.php@@ -76,7 +76,7 @@ class UpdateRequest extends FormRequest* Configure the validator instance with special rules for after the basic validation rules.** @param Validator $validator- * TODO duplicate code.+* See reference nr. 72** @return void*/diff --git a/app/Api/V1/Requests/Models/Tag/UpdateRequest.php b/app/Api/V1/Requests/Models/Tag/UpdateRequest.phpindex 973d750d63..ec94768db2 100644--- a/app/Api/V1/Requests/Models/Tag/UpdateRequest.php+++ b/app/Api/V1/Requests/Models/Tag/UpdateRequest.php@@ -65,7 +65,7 @@ class UpdateRequest extends FormRequestpublic function rules(): array{$tag = $this->route()->parameter('tagOrId');- // TODO is uniqueObjectForUser not obsolete?+// See reference nr. 73$rules = ['tag' => 'min:1|uniqueObjectForUser:tags,tag,' . $tag->id,'description' => 'min:1|nullable',diff --git a/app/Api/V1/Requests/Models/Transaction/StoreRequest.php b/app/Api/V1/Requests/Models/Transaction/StoreRequest.phpindex 1298fd6c05..fbdec3a18d 100644--- a/app/Api/V1/Requests/Models/Transaction/StoreRequest.php+++ b/app/Api/V1/Requests/Models/Transaction/StoreRequest.php@@ -60,7 +60,7 @@ class StoreRequest extends FormRequest'fire_webhooks' => $this->boolean('fire_webhooks', true),'transactions' => $this->getTransactionData(),];- // TODO location+// See reference nr. 71}/**diff --git a/app/Events/StoredTransactionLink.php b/app/Events/StoredTransactionLink.phpindex 087142ca0a..6bce61a13b 100644--- a/app/Events/StoredTransactionLink.php+++ b/app/Events/StoredTransactionLink.php@@ -27,7 +27,7 @@ use Illuminate\Queue\SerializesModels;/*** Class StoredTransactionLink- * TODO not used.+* See reference nr. 85*/class StoredTransactionLink extends Event{diff --git a/app/Events/UpdatedTransactionLink.php b/app/Events/UpdatedTransactionLink.phpindex c2499ec9a2..325988a955 100644--- a/app/Events/UpdatedTransactionLink.php+++ b/app/Events/UpdatedTransactionLink.php@@ -27,7 +27,7 @@ use Illuminate\Queue\SerializesModels;/*** Class UpdatedTransactionLink- * TODO unused+* See reference nr. 86*/class UpdatedTransactionLink extends Event{diff --git a/app/Generator/Report/Budget/MonthReportGenerator.php b/app/Generator/Report/Budget/MonthReportGenerator.phpindex 8c01709d2a..e30d4632db 100644--- a/app/Generator/Report/Budget/MonthReportGenerator.php+++ b/app/Generator/Report/Budget/MonthReportGenerator.php@@ -34,7 +34,7 @@ use Throwable;/*** Class MonthReportGenerator.- * TODO include info about tags.+* See reference nr. 19** @codeCoverageIgnore*/diff --git a/app/Generator/Report/Category/MonthReportGenerator.php b/app/Generator/Report/Category/MonthReportGenerator.phpindex 9461be2b90..804b376447 100644--- a/app/Generator/Report/Category/MonthReportGenerator.php+++ b/app/Generator/Report/Category/MonthReportGenerator.php@@ -35,7 +35,7 @@ use Throwable;/*** Class MonthReportGenerator.- * TODO include info about tags.+* See reference nr. 18** @codeCoverageIgnore*/diff --git a/app/Helpers/Webhook/Sha3SignatureGenerator.php b/app/Helpers/Webhook/Sha3SignatureGenerator.phpindex 8f06f1604a..aa5b7e1ce6 100644--- a/app/Helpers/Webhook/Sha3SignatureGenerator.php+++ b/app/Helpers/Webhook/Sha3SignatureGenerator.php@@ -41,7 +41,7 @@ class Sha3SignatureGenerator implements SignatureGeneratorInterfacetry {$json = json_encode($message->message, JSON_THROW_ON_ERROR);} catch (JsonException $e) {- // TODO needs FireflyException.+// See reference nr. 87return sprintf('t=1,v%d=err-invalid-signature', $this->getVersion());}diff --git a/app/Http/Controllers/Account/IndexController.php b/app/Http/Controllers/Account/IndexController.phpindex f9b30d3059..2d008188bc 100644--- a/app/Http/Controllers/Account/IndexController.php+++ b/app/Http/Controllers/Account/IndexController.php@@ -159,7 +159,7 @@ class IndexController extends Controller$accounts->each(function (Account $account) use ($activities, $startBalances, $endBalances) {- // TODO lots of queries executed in this block.+// See reference nr. 68$account->lastActivityDate = $this->isInArray($activities, $account->id);$account->startBalance = $this->isInArray($startBalances, $account->id);$account->endBalance = $this->isInArray($endBalances, $account->id);diff --git a/app/Http/Controllers/Chart/AccountController.php b/app/Http/Controllers/Chart/AccountController.phpindex 91d9ec0266..9b49e08a45 100644--- a/app/Http/Controllers/Chart/AccountController.php+++ b/app/Http/Controllers/Chart/AccountController.php@@ -509,7 +509,7 @@ class AccountController extends Controller/*** Shows the balances for a given set of dates and accounts.*- * TODO this chart is not multi-currency aware.+* See reference nr. 55** @param Carbon $start* @param Carbon $enddiff --git a/app/Http/Controllers/Chart/CategoryController.php b/app/Http/Controllers/Chart/CategoryController.phpindex a93fec10d3..f8fd2e6f59 100644--- a/app/Http/Controllers/Chart/CategoryController.php+++ b/app/Http/Controllers/Chart/CategoryController.php@@ -63,7 +63,7 @@ class CategoryController extends Controller/*** Show an overview for a category for all time, per month/week/year.- * TODO test method, for category refactor.+* See reference nr. 59** @param Category $category*@@ -111,7 +111,7 @@ class CategoryController extends Controller/*** Shows the category chart on the front page.- * TODO test method, for category refactor.+* See reference nr. 60** @return JsonResponse*/@@ -138,7 +138,7 @@ class CategoryController extends Controller/*** Chart report.- * TODO test method, for category refactor.+* See reference nr. 61** @param Category $category* @param Collection $accounts@@ -254,7 +254,7 @@ class CategoryController extends Controller/*** Chart for period for transactions without a category.- * TODO test me.+* See reference nr. 62** @param Collection $accounts* @param Carbon $start@@ -281,7 +281,7 @@ class CategoryController extends Controller/*** Chart for a specific period.- * TODO test method, for category refactor.+* See reference nr. 63** @param Category $category* @param Carbon $datediff --git a/app/Http/Controllers/Chart/CategoryReportController.php b/app/Http/Controllers/Chart/CategoryReportController.phpindex d6812134a0..19a05b6b59 100644--- a/app/Http/Controllers/Chart/CategoryReportController.php+++ b/app/Http/Controllers/Chart/CategoryReportController.php@@ -318,7 +318,7 @@ class CategoryReportController extends Controller}/**- * TODO duplicate function+* See reference nr. 57** @param Carbon $start* @param Carbon $enddiff --git a/app/Http/Controllers/Chart/DoubleReportController.php b/app/Http/Controllers/Chart/DoubleReportController.phpindex 0060605cdc..ac7315c507 100644--- a/app/Http/Controllers/Chart/DoubleReportController.php+++ b/app/Http/Controllers/Chart/DoubleReportController.php@@ -249,7 +249,7 @@ class DoubleReportController extends Controller}/**- * TODO this method is double.+* See reference nr. 51** @param Collection $accounts* @param int $id@@ -274,7 +274,7 @@ class DoubleReportController extends Controller}/**- * TODO duplicate function+* See reference nr. 52** @param Carbon $start* @param Carbon $enddiff --git a/app/Http/Controllers/Chart/ExpenseReportController.php b/app/Http/Controllers/Chart/ExpenseReportController.phpindex bbd289c54a..3236f9b1be 100644--- a/app/Http/Controllers/Chart/ExpenseReportController.php+++ b/app/Http/Controllers/Chart/ExpenseReportController.php@@ -69,7 +69,7 @@ class ExpenseReportController extends Controller/*** Main chart that shows income and expense for a combination of expense/revenue accounts.*- * TODO this chart is not multi-currency aware.+* See reference nr. 58** @param Collection $accounts* @param Collection $expensediff --git a/app/Http/Controllers/Chart/PiggyBankController.php b/app/Http/Controllers/Chart/PiggyBankController.phpindex d40c0ebd01..be6ba88848 100644--- a/app/Http/Controllers/Chart/PiggyBankController.php+++ b/app/Http/Controllers/Chart/PiggyBankController.php@@ -58,7 +58,7 @@ class PiggyBankController extends Controller/*** Shows the piggy bank history.*- * TODO this chart is not multi-currency aware.+* See reference nr. 53** @param PiggyBankRepositoryInterface $repository* @param PiggyBank $piggyBankdiff --git a/app/Http/Controllers/Chart/ReportController.php b/app/Http/Controllers/Chart/ReportController.phpindex 4f7b7f91e5..304d5ea347 100644--- a/app/Http/Controllers/Chart/ReportController.php+++ b/app/Http/Controllers/Chart/ReportController.php@@ -102,7 +102,7 @@ class ReportController extends Controller});- // TODO get liabilities and include those as well?+// See reference nr. 56while ($current < $end) {// get balances by date, grouped by currency.diff --git a/app/Http/Controllers/Chart/TagReportController.php b/app/Http/Controllers/Chart/TagReportController.phpindex 395202d481..802d9c86de 100644--- a/app/Http/Controllers/Chart/TagReportController.php+++ b/app/Http/Controllers/Chart/TagReportController.php@@ -323,7 +323,7 @@ class TagReportController extends Controller}/**- * TODO duplicate function+* See reference nr. 54** @param Carbon $start* @param Carbon $enddiff --git a/app/Http/Controllers/PiggyBank/IndexController.php b/app/Http/Controllers/PiggyBank/IndexController.phpindex 571c79c4bb..275e454005 100644--- a/app/Http/Controllers/PiggyBank/IndexController.php+++ b/app/Http/Controllers/PiggyBank/IndexController.php@@ -69,7 +69,7 @@ class IndexController extends Controller/*** Show overview of all piggy banks.- * TODO complicated+* See reference nr. 66** @param Request $request*diff --git a/app/Http/Controllers/ProfileController.php b/app/Http/Controllers/ProfileController.phpindex a6276b9bf2..49df2a6b08 100644--- a/app/Http/Controllers/ProfileController.php+++ b/app/Http/Controllers/ProfileController.php@@ -653,7 +653,7 @@ class ProfileController extends Controller}/**- * TODO duplicate code.+* See reference nr. 64** @param string $mfaCode*/diff --git a/app/Http/Controllers/Recurring/EditController.php b/app/Http/Controllers/Recurring/EditController.phpindex 06cbb852e8..910b0046c7 100644--- a/app/Http/Controllers/Recurring/EditController.php+++ b/app/Http/Controllers/Recurring/EditController.php@@ -86,7 +86,7 @@ class EditController extends Controller*/public function edit(Request $request, Recurrence $recurrence){- // TODO should be in repos+// See reference nr. 69$count = $recurrence->recurrenceTransactions()->count();if (0 === $count) {throw new FireflyException('This recurring transaction has no meta-data. You will have to delete it and recreate it. Sorry!');diff --git a/app/Http/Controllers/Recurring/IndexController.php b/app/Http/Controllers/Recurring/IndexController.phpindex 7a73e0eb18..367c14793a 100644--- a/app/Http/Controllers/Recurring/IndexController.php+++ b/app/Http/Controllers/Recurring/IndexController.php@@ -68,7 +68,7 @@ class IndexController extends Controller}/**- * TODO the notes of a recurrence are pretty pointless at this moment.+* See reference nr. 70* Show all recurring transactions.** @param Request $requestdiff --git a/app/Http/Controllers/Report/DoubleController.php b/app/Http/Controllers/Report/DoubleController.phpindex cb1d8e90dd..71dc05966c 100644--- a/app/Http/Controllers/Report/DoubleController.php+++ b/app/Http/Controllers/Report/DoubleController.php@@ -292,7 +292,7 @@ class DoubleController extends Controller}/**- * TODO this method is double.+* See reference nr. 67** @param Collection $accounts* @param int $iddiff --git a/app/Http/Controllers/Rule/EditController.php b/app/Http/Controllers/Rule/EditController.phpindex 9ba0f7fd6f..ac7671bdc0 100644--- a/app/Http/Controllers/Rule/EditController.php+++ b/app/Http/Controllers/Rule/EditController.php@@ -143,7 +143,7 @@ class EditController extends Controller*/private function parseFromOperators(array $submittedOperators): array{- // TODO duplicated code.+// See reference nr. 65$operators = config('firefly.search.operators');$renderedEntries = [];$triggers = [];diff --git a/app/Http/Controllers/Transaction/BulkController.php b/app/Http/Controllers/Transaction/BulkController.phpindex fadb350d4c..91aea8def1 100644--- a/app/Http/Controllers/Transaction/BulkController.php+++ b/app/Http/Controllers/Transaction/BulkController.php@@ -63,7 +63,7 @@ class BulkController extends Controller/*** Edit a set of journals in bulk.*- * TODO user wont be able to tell if journal is part of split.+* See reference nr. 47** @param array $journals*diff --git a/app/Http/Controllers/Transaction/ConvertController.php b/app/Http/Controllers/Transaction/ConvertController.phpindex fa4c17bd60..12c50e21ca 100644--- a/app/Http/Controllers/Transaction/ConvertController.php+++ b/app/Http/Controllers/Transaction/ConvertController.php@@ -47,7 +47,7 @@ use Log;/*** Class ConvertController.*- * TODO when converting to a split transfer, all sources and destinations must be the same.+* See reference nr. 49*/class ConvertController extends Controller{@@ -346,7 +346,7 @@ class ConvertController extends Controllerthrow new FireflyException(sprintf(trans('firefly.convert_invalid_destination'), $journal->id));}- // TODO typeOverrule: the account validator may have another opinion on the transaction type.+// See reference nr. 50$update = ['source_id' => $sourceId,diff --git a/app/Http/Controllers/Transaction/MassController.php b/app/Http/Controllers/Transaction/MassController.phpindex 666e4f6d83..409dee94db 100644--- a/app/Http/Controllers/Transaction/MassController.php+++ b/app/Http/Controllers/Transaction/MassController.php@@ -167,7 +167,7 @@ class MassController extends Controller{$journalIds = $request->get('journals');if (!is_array($journalIds)) {- // TODO something error.+// See reference nr. 48throw new FireflyException('This is not an array.');}$count = 0;diff --git a/app/Http/Requests/RecurrenceFormRequest.php b/app/Http/Requests/RecurrenceFormRequest.phpindex a7026eb65b..1fd8aad43c 100644--- a/app/Http/Requests/RecurrenceFormRequest.php+++ b/app/Http/Requests/RecurrenceFormRequest.php@@ -304,7 +304,7 @@ class RecurrenceFormRequest extends FormRequest$sourceId = null;$destinationId = null;- // TODO typeOverrule: the account validator may have another opinion on the transaction type.+// See reference nr. 45switch ($this->string('transaction_type')) {default:diff --git a/app/Http/Requests/TestRuleFormRequest.php b/app/Http/Requests/TestRuleFormRequest.phpindex d6f681a700..27dd553aee 100644--- a/app/Http/Requests/TestRuleFormRequest.php+++ b/app/Http/Requests/TestRuleFormRequest.php@@ -37,7 +37,7 @@ class TestRuleFormRequest extends FormRequest/*** Rules for this request.- * TODO these rules are not valid anymore.+* See reference nr. 46** @return array*/diff --git a/app/Models/Configuration.php b/app/Models/Configuration.phpindex 4913d85c2d..865e378338 100644--- a/app/Models/Configuration.php+++ b/app/Models/Configuration.php@@ -70,7 +70,7 @@ class Configuration extends Modelprotected $table = 'configuration';/**- * TODO can be replaced by native laravel code+* See reference nr. 17* @codeCoverageIgnore** @param mixed $valuediff --git a/app/Repositories/Account/AccountRepository.php b/app/Repositories/Account/AccountRepository.phpindex 4dada19f82..ed49193657 100644--- a/app/Repositories/Account/AccountRepository.php+++ b/app/Repositories/Account/AccountRepository.php@@ -130,7 +130,7 @@ class AccountRepository implements AccountRepositoryInterface$query->whereIn('account_types.type', $types);}- // TODO a loop like this is no longer necessary+// See reference nr. 9$accounts = $query->get(['accounts.*']);/** @var Account $account */@@ -161,7 +161,7 @@ class AccountRepository implements AccountRepositoryInterface$accounts = $query->get(['accounts.*']);- // TODO no longer need to loop like this+// See reference nr. 10/** @var Account $account */foreach ($accounts as $account) {diff --git a/app/Repositories/Bill/BillRepository.php b/app/Repositories/Bill/BillRepository.phpindex bb782841f2..e6a03855c5 100644--- a/app/Repositories/Bill/BillRepository.php+++ b/app/Repositories/Bill/BillRepository.php@@ -148,7 +148,7 @@ class BillRepository implements BillRepositoryInterface{$bills = $this->user->bills()->get(['bills.*']);- // TODO no longer need to loop like this+// See reference nr. 6/** @var Bill $bill */foreach ($bills as $bill) {diff --git a/app/Repositories/Budget/BudgetLimitRepositoryInterface.php b/app/Repositories/Budget/BudgetLimitRepositoryInterface.phpindex edafbf4a52..c74adb0db1 100644--- a/app/Repositories/Budget/BudgetLimitRepositoryInterface.php+++ b/app/Repositories/Budget/BudgetLimitRepositoryInterface.php@@ -72,7 +72,7 @@ interface BudgetLimitRepositoryInterfacepublic function find(Budget $budget, TransactionCurrency $currency, Carbon $start, Carbon $end): ?BudgetLimit;/**- * TODO this method is not multi-currency aware.+* See reference nr. 11** @param Carbon|null $start* @param Carbon|null $enddiff --git a/app/Repositories/Budget/BudgetRepositoryInterface.php b/app/Repositories/Budget/BudgetRepositoryInterface.phpindex 933a10bd2c..f5eadde2eb 100644--- a/app/Repositories/Budget/BudgetRepositoryInterface.php+++ b/app/Repositories/Budget/BudgetRepositoryInterface.php@@ -74,7 +74,7 @@ interface BudgetRepositoryInterfacepublic function findByName(?string $name): ?Budget;/**- * TODO refactor to "find"+* See reference nr. 12** @param int|null $budgetId*diff --git a/app/Repositories/Budget/NoBudgetRepository.php b/app/Repositories/Budget/NoBudgetRepository.phpindex 56eeb24d85..f0874b6cd4 100644--- a/app/Repositories/Budget/NoBudgetRepository.php+++ b/app/Repositories/Budget/NoBudgetRepository.php@@ -146,8 +146,8 @@ class NoBudgetRepository implements NoBudgetRepositoryInterface/** @noinspection MoreThanThreeArgumentsInspection *//**- * TODO this method does not include foreign amount transactions. It only sums up "amount".- * TODO this probably also applies to the other "sumExpenses" methods.+* See reference nr. 15+* See reference nr. 16** @param Carbon $start* @param Carbon $enddiff --git a/app/Repositories/Budget/OperationsRepository.php b/app/Repositories/Budget/OperationsRepository.phpindex 35995e1460..198c82533e 100644--- a/app/Repositories/Budget/OperationsRepository.php+++ b/app/Repositories/Budget/OperationsRepository.php@@ -227,7 +227,7 @@ class OperationsRepository implements OperationsRepositoryInterfaceif ($accounts->count() > 0) {$collector->setAccounts($accounts);}- // TODO possible candidate for getExtractedGroups+// See reference nr. 13$set = $collector->getGroups();$return = [];$total = [];@@ -359,7 +359,7 @@ class OperationsRepository implements OperationsRepositoryInterface/*** For now, simply refer to whichever repository holds this function.- * TODO might be done better in the future.+* See reference nr. 14** @param Budget $budget* @param Carbon|null $startdiff --git a/app/Repositories/Category/CategoryRepository.php b/app/Repositories/Category/CategoryRepository.phpindex b10614f461..115624078e 100644--- a/app/Repositories/Category/CategoryRepository.php+++ b/app/Repositories/Category/CategoryRepository.php@@ -89,7 +89,7 @@ class CategoryRepository implements CategoryRepositoryInterface{$categories = $this->user->categories()->get(['categories.*']);- // TODO no longer need to loop like this+// See reference nr. 7foreach ($categories as $category) {if ($category->name === $name) {diff --git a/app/Repositories/Journal/JournalRepositoryInterface.php b/app/Repositories/Journal/JournalRepositoryInterface.phpindex cc5e509514..f6a29ef255 100644--- a/app/Repositories/Journal/JournalRepositoryInterface.php+++ b/app/Repositories/Journal/JournalRepositoryInterface.php@@ -58,7 +58,7 @@ interface JournalRepositoryInterfacepublic function findByType(array $types): Collection;/**- * TODO Refactor to "find".+* See reference nr. 1* Find a specific journal.** @param int $journalId@@ -85,7 +85,7 @@ interface JournalRepositoryInterfacepublic function getDestinationAccount(TransactionJournal $journal): Account;/**- * TODO this method is no longer well-fitted in 4.8,0. Should be refactored and/or removed.+* See reference nr. 2* Return a list of all destination accounts related to journal.** @param TransactionJournal $journal@@ -96,7 +96,7 @@ interface JournalRepositoryInterfacepublic function getJournalDestinationAccounts(TransactionJournal $journal): Collection;/**- * TODO this method is no longer well-fitted in 4.8,0. Should be refactored and/or removed.+* See reference nr. 3* Return a list of all source accounts related to journal.** @param TransactionJournal $journal@@ -121,7 +121,7 @@ interface JournalRepositoryInterfacepublic function getLast(): ?TransactionJournal;/**- * TODO used only in transformer, so only for API use.+* See reference nr. 4** @param TransactionJournalLink $link*@@ -150,7 +150,7 @@ interface JournalRepositoryInterfacepublic function getSourceAccount(TransactionJournal $journal): Account;/**- * TODO maybe move to account repository?+* See reference nr. 5** @param int $journalId*/diff --git a/app/Repositories/User/UserRepository.php b/app/Repositories/User/UserRepository.phpindex 177f882d0d..f488448854 100644--- a/app/Repositories/User/UserRepository.php+++ b/app/Repositories/User/UserRepository.php@@ -269,7 +269,7 @@ class UserRepository implements UserRepositoryInterface*/public function hasRole(User $user, string $role): bool{- // TODO no longer need to loop like this+// See reference nr. 8/** @var Role $userRole */foreach ($user->roles as $userRole) {diff --git a/app/Services/Internal/Support/AccountServiceTrait.php b/app/Services/Internal/Support/AccountServiceTrait.phpindex d0217f22ff..3305501129 100644--- a/app/Services/Internal/Support/AccountServiceTrait.php+++ b/app/Services/Internal/Support/AccountServiceTrait.php@@ -102,7 +102,7 @@ trait AccountServiceTrait/*** Update meta data for account. Depends on type which fields are valid.*- * TODO this method treats expense accounts and liabilities the same way (tries to save interest)+* See reference nr. 97** @param Account $account* @param array $data@@ -410,7 +410,7 @@ trait AccountServiceTrait}/**- * TODO rename to "getOpposingTransaction"+* See reference nr. 98** @param TransactionJournal $journal* @param Account $account@@ -705,7 +705,7 @@ trait AccountServiceTrait}/**- * TODO Refactor to "getFirstJournal"+* See reference nr. 99** @param TransactionGroup $group*diff --git a/app/Services/Internal/Support/RecurringTransactionTrait.php b/app/Services/Internal/Support/RecurringTransactionTrait.phpindex ffd5a6773f..5ada279fb7 100644--- a/app/Services/Internal/Support/RecurringTransactionTrait.php+++ b/app/Services/Internal/Support/RecurringTransactionTrait.php@@ -145,7 +145,7 @@ trait RecurringTransactionTraitif (array_key_exists('foreign_amount', $array) && '' === (string)$array['foreign_amount']) {unset($array['foreign_amount']);}- // TODO typeOverrule: the account validator may have another opinion on the transaction type.+// See reference nr. 100$transaction = new RecurrenceTransaction(['recurrence_id' => $recurrence->id,diff --git a/app/Services/Internal/Update/AccountUpdateService.php b/app/Services/Internal/Update/AccountUpdateService.phpindex 7943fa7f14..bc9b9fbe31 100644--- a/app/Services/Internal/Update/AccountUpdateService.php+++ b/app/Services/Internal/Update/AccountUpdateService.php@@ -35,7 +35,7 @@ use Log;/*** Class AccountUpdateService- * TODO this is a mess.+* See reference nr. 90*/class AccountUpdateService{diff --git a/app/Services/Internal/Update/GroupCloneService.php b/app/Services/Internal/Update/GroupCloneService.phpindex c08ae5d5e0..ffaf0113f1 100644--- a/app/Services/Internal/Update/GroupCloneService.php+++ b/app/Services/Internal/Update/GroupCloneService.php@@ -35,7 +35,7 @@ use FireflyIII\Models\TransactionJournalMeta;/*** Class GroupCloneService- * TODO test.+* See reference nr. 92*/class GroupCloneService{diff --git a/app/Services/Internal/Update/GroupUpdateService.php b/app/Services/Internal/Update/GroupUpdateService.phpindex a987c818b9..41dd3f6c1d 100644--- a/app/Services/Internal/Update/GroupUpdateService.php+++ b/app/Services/Internal/Update/GroupUpdateService.php@@ -32,7 +32,7 @@ use Log;/*** Class GroupUpdateService- * TODO test.+* See reference nr. 91*/class GroupUpdateService{diff --git a/app/Services/Internal/Update/JournalUpdateService.php b/app/Services/Internal/Update/JournalUpdateService.phpindex 0ff12ae493..d13ea0d83d 100644--- a/app/Services/Internal/Update/JournalUpdateService.php+++ b/app/Services/Internal/Update/JournalUpdateService.php@@ -48,7 +48,7 @@ use Log;* Class to centralise code that updates a journal given the input by system.** Class JournalUpdateService- * TODO test me+* See reference nr. 93*/class JournalUpdateService{@@ -158,7 +158,7 @@ class JournalUpdateService$this->updateAmount();$this->updateForeignAmount();- // TODO update hash+// See reference nr. 94app('preferences')->mark();@@ -201,7 +201,7 @@ class JournalUpdateService$result = $validator->validateSource($sourceId, $sourceName, null);Log::debug(sprintf('hasValidSourceAccount(%d, "%s") will return %s', $sourceId, $sourceName, var_export($result, true)));- // TODO typeOverrule: the account validator may have another opinion on the transaction type.+// See reference nr. 95// validate submitted info:return $result;@@ -295,7 +295,7 @@ class JournalUpdateService$result = $validator->validateDestination($destId, $destName, null);Log::debug(sprintf('hasValidDestinationAccount(%d, "%s") will return %s', $destId, $destName, var_export($result, true)));- // TODO typeOverrule: the account validator may have another opinion on the transaction type.+// See reference nr. 96// validate submitted info:return $result;diff --git a/app/Services/Internal/Update/RecurrenceUpdateService.php b/app/Services/Internal/Update/RecurrenceUpdateService.phpindex 77c2a48ff7..812bca8f6a 100644--- a/app/Services/Internal/Update/RecurrenceUpdateService.php+++ b/app/Services/Internal/Update/RecurrenceUpdateService.php@@ -49,7 +49,7 @@ class RecurrenceUpdateService/*** Updates a recurrence.*- * TODO if the user updates the type, accounts must be validated (again).+* See reference nr. 88** @param Recurrence $recurrence* @param array $data@@ -217,7 +217,7 @@ class RecurrenceUpdateService}/**- * TODO this method is way too complex.+* See reference nr. 89** @param Recurrence $recurrence* @param array $transactionsdiff --git a/app/Support/Chart/Category/WholePeriodChartGenerator.php b/app/Support/Chart/Category/WholePeriodChartGenerator.phpindex c8c526b442..a4afe0c8d4 100644--- a/app/Support/Chart/Category/WholePeriodChartGenerator.php+++ b/app/Support/Chart/Category/WholePeriodChartGenerator.php@@ -115,7 +115,7 @@ class WholePeriodChartGenerator}/**- * TODO is a duplicate function.+* See reference nr. 32** @param Carbon $start* @param Carbon $enddiff --git a/app/Support/Export/ExportDataGenerator.php b/app/Support/Export/ExportDataGenerator.phpindex d9e2def51d..7db505e549 100644--- a/app/Support/Export/ExportDataGenerator.php+++ b/app/Support/Export/ExportDataGenerator.php@@ -644,7 +644,7 @@ class ExportDataGenerator*/private function exportTransactions(): string{- // TODO better place for keys?+// See reference nr. 41$header = ['user_id', 'group_id', 'journal_id', 'created_at', 'updated_at', 'group_title', 'type', 'amount', 'foreign_amount', 'currency_code','foreign_currency_code', 'description', 'date', 'source_name', 'source_iban', 'source_type', 'destination_name', 'destination_iban','destination_type', 'reconciled', 'category', 'budget', 'bill', 'tags', 'notes',diff --git a/app/Support/Form/AccountForm.php b/app/Support/Form/AccountForm.phpindex 16b0ae0b40..1ee2f33919 100644--- a/app/Support/Form/AccountForm.php+++ b/app/Support/Form/AccountForm.php@@ -33,8 +33,8 @@ use Throwable;** All form methods that are account related.*- * TODO describe all methods.- * TODO optimize repositories and methods.+* See reference nr. 29+* See reference nr. 30*/class AccountForm{diff --git a/app/Support/Form/CurrencyForm.php b/app/Support/Form/CurrencyForm.phpindex ad5fa7eef4..7299245058 100644--- a/app/Support/Form/CurrencyForm.php+++ b/app/Support/Form/CurrencyForm.php@@ -35,7 +35,7 @@ use Throwable;** All currency related form methods.*- * TODO cleanup and describe.+* See reference nr. 22*/class CurrencyForm{@@ -107,7 +107,7 @@ class CurrencyForm}/**- * TODO describe and cleanup.+* See reference nr. 23** @param string $name* @param mixed $value@@ -121,7 +121,7 @@ class CurrencyForm}/**- * TODO cleanup and describe better.+* See reference nr. 24** @param string $name* @param string $view@@ -176,7 +176,7 @@ class CurrencyForm}/**- * TODO cleanup and describe.+* See reference nr. 25** @param string $name* @param mixed $value@@ -201,7 +201,7 @@ class CurrencyForm}/**- * TODO cleanup and describe.+* See reference nr. 26** @param string $name* @param mixed $valuediff --git a/app/Support/Form/PiggyBankForm.php b/app/Support/Form/PiggyBankForm.phpindex 068bfbcfca..2586268a12 100644--- a/app/Support/Form/PiggyBankForm.php+++ b/app/Support/Form/PiggyBankForm.php@@ -28,14 +28,14 @@ use FireflyIII\Repositories\PiggyBank\PiggyBankRepositoryInterface;/*** Class PiggyBankForm*- * TODO cleanup and describe.+* See reference nr. 27*/class PiggyBankForm{use FormSupport;/**- * TODO cleanup and describe.+* See reference nr. 28** @param string $name* @param mixed $valuediff --git a/app/Support/Form/RuleForm.php b/app/Support/Form/RuleForm.phpindex f90091c697..4ffd8dbd6b 100644--- a/app/Support/Form/RuleForm.php+++ b/app/Support/Form/RuleForm.php@@ -29,7 +29,7 @@ use Illuminate\Support\HtmlString;/*** Class RuleForm- * TODO cleanup and describe.+* See reference nr. 31*/class RuleForm{diff --git a/app/Support/Http/Controllers/ChartGeneration.php b/app/Support/Http/Controllers/ChartGeneration.phpindex 50415ca22c..fda7339759 100644--- a/app/Support/Http/Controllers/ChartGeneration.php+++ b/app/Support/Http/Controllers/ChartGeneration.php@@ -73,7 +73,7 @@ trait ChartGeneration$chartData = [];/** @var Account $account */foreach ($accounts as $account) {- // TODO we can use getAccountCurrency() instead+// See reference nr. 33$currency = $repository->findNull((int)$accountRepos->getMetaValue($account, 'currency_id'));if (null === $currency) {$currency = $default;diff --git a/app/Support/Http/Controllers/ModelInformation.php b/app/Support/Http/Controllers/ModelInformation.phpindex 7f6b16014c..9798b973e0 100644--- a/app/Support/Http/Controllers/ModelInformation.php+++ b/app/Support/Http/Controllers/ModelInformation.php@@ -115,7 +115,7 @@ trait ModelInformation*/protected function getTriggersForBill(Bill $bill): array // get info and augument{- // TODO duplicated code.+// See reference nr. 39$operators = config('firefly.search.operators');$triggers = [];foreach ($operators as $key => $operator) {@@ -167,7 +167,7 @@ trait ModelInformation*/private function getTriggersForJournal(TransactionJournal $journal): array{- // TODO duplicated code.+// See reference nr. 40$operators = config('firefly.search.operators');$triggers = [];foreach ($operators as $key => $operator) {diff --git a/app/Support/Http/Controllers/PeriodOverview.php b/app/Support/Http/Controllers/PeriodOverview.phpindex 095f2ba10e..9e26079941 100644--- a/app/Support/Http/Controllers/PeriodOverview.php+++ b/app/Support/Http/Controllers/PeriodOverview.php@@ -38,7 +38,7 @@ use Log;/*** Trait PeriodOverview.*- * TODO verify this all works as expected.+* See reference nr. 36** - Always request start date and end date.* - Group expenses, income, etc. under this period.@@ -392,7 +392,7 @@ trait PeriodOverview}/**- * TODO fix date.+* See reference nr. 37** Show period overview for no category view.*diff --git a/app/Support/Http/Controllers/RenderPartialViews.php b/app/Support/Http/Controllers/RenderPartialViews.phpindex 9608927719..2258a175e5 100644--- a/app/Support/Http/Controllers/RenderPartialViews.php+++ b/app/Support/Http/Controllers/RenderPartialViews.php@@ -292,7 +292,7 @@ trait RenderPartialViews*/protected function getCurrentTriggers(Rule $rule): array // get info from object and present.{- // TODO duplicated code.+// See reference nr. 38$operators = config('firefly.search.operators');$triggers = [];foreach ($operators as $key => $operator) {diff --git a/app/Support/Http/Controllers/RuleManagement.php b/app/Support/Http/Controllers/RuleManagement.phpindex 0d03105b5b..417ca46140 100644--- a/app/Support/Http/Controllers/RuleManagement.php+++ b/app/Support/Http/Controllers/RuleManagement.php@@ -79,7 +79,7 @@ trait RuleManagement*/protected function getPreviousTriggers(Request $request): array{- // TODO duplicated code.+// See reference nr. 34$operators = config('firefly.search.operators');$triggers = [];foreach ($operators as $key => $operator) {@@ -124,7 +124,7 @@ trait RuleManagement*/protected function parseFromOperators(array $submittedOperators): array{- // TODO duplicated code.+// See reference nr. 35$operators = config('firefly.search.operators');$renderedEntries = [];$triggers = [];diff --git a/app/Support/Preferences.php b/app/Support/Preferences.phpindex a75b5ec580..f7b8d59e4e 100644--- a/app/Support/Preferences.php+++ b/app/Support/Preferences.php@@ -183,7 +183,7 @@ class Preferences* @param null $default** @return Preference|null- * TODO remove me+* See reference nr. 44* @throws FireflyException*/public function getFreshForUser(User $user, string $name, $default = null): ?Preferencediff --git a/app/Support/Twig/AmountFormat.php b/app/Support/Twig/AmountFormat.phpindex 80d1c17a19..a0f3f3d4b1 100644--- a/app/Support/Twig/AmountFormat.php+++ b/app/Support/Twig/AmountFormat.php@@ -93,7 +93,7 @@ class AmountFormat extends AbstractExtension* Will format the amount by the currency related to the given account.** @return TwigFunction- * TODO remove me when layout v1 is deprecated.+* See reference nr. 42*/protected function formatAmountByAccount(): TwigFunction{diff --git a/app/Support/Twig/General.php b/app/Support/Twig/General.phpindex 3bf2a7ba10..4517bc30d4 100644--- a/app/Support/Twig/General.php+++ b/app/Support/Twig/General.php@@ -355,7 +355,7 @@ class General extends AbstractExtension/*** @return TwigFunction- * TODO remove me once layout v1 is deprecated.+* See reference nr. 43*/protected function getMetaField(): TwigFunction{diff --git a/app/Transformers/AccountTransformer.php b/app/Transformers/AccountTransformer.phpindex da1522c070..466d657e88 100644--- a/app/Transformers/AccountTransformer.php+++ b/app/Transformers/AccountTransformer.php@@ -212,7 +212,7 @@ class AccountTransformer extends AbstractTransformer** @return array*- * TODO refactor call to getOpeningBalanceAmount / Date because its extra queries.+* See reference nr. 20*/private function getOpeningBalance(Account $account, string $accountType): array{diff --git a/app/Transformers/TagTransformer.php b/app/Transformers/TagTransformer.phpindex d1119ff650..b65ca5e461 100644--- a/app/Transformers/TagTransformer.php+++ b/app/Transformers/TagTransformer.php@@ -34,7 +34,7 @@ class TagTransformer extends AbstractTransformer/*** Transform a tag.*- * TODO add spent, earned, transferred, etc.+* See reference nr. 21** @param Tag $tag*diff --git a/app/Validation/FireflyValidator.php b/app/Validation/FireflyValidator.phpindex 8f2ce7275f..21c85d620f 100644--- a/app/Validation/FireflyValidator.php+++ b/app/Validation/FireflyValidator.php@@ -265,7 +265,7 @@ class FireflyValidator extends Validator$repository = app(BudgetRepositoryInterface::class);$budgets = $repository->getBudgets();// count budgets, should have at least one- // TODO no longer need to loop like this+// See reference nr. 102$count = $budgets->filter(function (Budget $budget) use ($value) {return $budget->name === $value;@@ -448,7 +448,7 @@ class FireflyValidator extends Validator$value = $this->data['name'];$set = $user->accounts()->where('account_type_id', $type->id)->get();- // TODO no longer need to loop like this+// See reference nr. 103/** @var Account $entry */foreach ($set as $entry) {if ($entry->name === $value) {@@ -480,7 +480,7 @@ class FireflyValidator extends Validator$accountTypeIds = $accountTypes->pluck('id')->toArray();/** @var Collection $set */$set = auth()->user()->accounts()->whereIn('account_type_id', $accountTypeIds)->where('id', '!=', $ignore)->get();- // TODO no longer need to loop like this+// See reference nr. 104/** @var Account $entry */foreach ($set as $entry) {if ($entry->name === $value) {@@ -504,10 +504,10 @@ class FireflyValidator extends Validator/** @var Collection $set */$set = auth()->user()->accounts()->where('account_type_id', $type->id)->where('id', '!=', $ignore)->get();- // TODO no longer need to loop like this+// See reference nr. 105/** @var Account $entry */foreach ($set as $entry) {- // TODO no longer need to loop like this.+// See reference nr. 106if ($entry->name === $value) {return false;}@@ -718,7 +718,7 @@ class FireflyValidator extends Validator* @param mixed $value* @param mixed $parameters*- * TODO this method does not need a for loop+* See reference nr. 107** @return bool*/diff --git a/app/Validation/RecurrenceValidation.php b/app/Validation/RecurrenceValidation.phpindex eed310d3a9..07de4d0fd7 100644--- a/app/Validation/RecurrenceValidation.php+++ b/app/Validation/RecurrenceValidation.php@@ -41,7 +41,7 @@ trait RecurrenceValidation/*** Validate account information input for recurrences which are being updated.*- * TODO must always trigger when the type of the recurrence changes.+ * See reference nr. 101** @param Validator $validator*/