Remove TODO's.

This commit is contained in:
James Cole
2021-06-11 20:39:01 +02:00
parent 0d7d3f45f0
commit 8832387b84
70 changed files with 107 additions and 107 deletions

View File

@@ -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) {

View File

@@ -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) {

View File

@@ -72,7 +72,7 @@ interface BudgetLimitRepositoryInterface
public 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 $end

View File

@@ -74,7 +74,7 @@ interface BudgetRepositoryInterface
public function findByName(?string $name): ?Budget;
/**
* TODO refactor to "find"
* See reference nr. 12
*
* @param int|null $budgetId
*

View File

@@ -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 $end

View File

@@ -227,7 +227,7 @@ class OperationsRepository implements OperationsRepositoryInterface
if ($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 $start

View File

@@ -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. 7
foreach ($categories as $category) {
if ($category->name === $name) {

View File

@@ -58,7 +58,7 @@ interface JournalRepositoryInterface
public 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 JournalRepositoryInterface
public 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 JournalRepositoryInterface
public 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 JournalRepositoryInterface
public 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 JournalRepositoryInterface
public function getSourceAccount(TransactionJournal $journal): Account;
/**
* TODO maybe move to account repository?
* See reference nr. 5
*
* @param int $journalId
*/

View File

@@ -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) {