Code cleanup

This commit is contained in:
James Cole
2023-10-28 15:03:33 +02:00
parent fa920fed4e
commit 0133a7c5db
77 changed files with 575 additions and 594 deletions

View File

@@ -262,6 +262,16 @@ class JournalRepository implements JournalRepositoryInterface
}
}
/**
* @inheritDoc
*/
public function unreconcileById(int $journalId): void
{
/** @var TransactionJournal $journal */
$journal = $this->user->transactionJournals()->find($journalId);
$journal?->transactions()->update(['reconciled' => false]);
}
/**
* Update budget for a journal.
*
@@ -334,14 +344,4 @@ class JournalRepository implements JournalRepositoryInterface
return $journal;
}
/**
* @inheritDoc
*/
public function unreconcileById(int $journalId): void
{
/** @var TransactionJournal $journal */
$journal = $this->user->transactionJournals()->find($journalId);
$journal?->transactions()->update(['reconciled' => false]);
}
}

View File

@@ -133,13 +133,6 @@ interface JournalRepositoryInterface
*/
public function reconcileById(int $journalId): void;
/**
* TODO Maybe to account repository? Do this wen reconcile is API only.
*
* @param int $journalId
*/
public function unreconcileById(int $journalId): void;
/**
* Search in journal descriptions.
*
@@ -155,6 +148,13 @@ interface JournalRepositoryInterface
*/
public function setUser(User | Authenticatable | null $user): void;
/**
* TODO Maybe to account repository? Do this wen reconcile is API only.
*
* @param int $journalId
*/
public function unreconcileById(int $journalId): void;
/**
* Update budget for a journal.
*