Firefly III: a personal finances manager
PHP accountingbudgetbudgetingbudgetscash-flowcashflowcredit-carddockerexpensesfinancefinancesfinanciallinuxmoneypaycheckpersonal-financephpphp7
Some code cleanup.
James Coleec12238ea180
diff --git a/app/Export/Processor.php b/app/Export/Processor.phpindex a5e8b1549b..38bc8345df 100644--- a/app/Export/Processor.php+++ b/app/Export/Processor.php@@ -15,6 +15,7 @@ use Config;use FireflyIII\Exceptions\FireflyException;use FireflyIII\Models\ExportJob;use FireflyIII\Models\TransactionJournal;+use FireflyIII\Repositories\Journal\JournalCollector;use Illuminate\Support\Collection;use Log;use Storage;@@ -89,6 +90,7 @@ class Processorpublic function collectJournals(): bool{$args = [$this->accounts, Auth::user(), $this->settings['startDate'], $this->settings['endDate']];+ /** @var JournalCollector $journalCollector */$journalCollector = app('FireflyIII\Repositories\Journal\JournalCollector', $args);$this->journals = $journalCollector->collect();Log::debug(diff --git a/app/Repositories/Bill/BillRepository.php b/app/Repositories/Bill/BillRepository.phpindex 44bafbd58b..90eb42c8b4 100644--- a/app/Repositories/Bill/BillRepository.php+++ b/app/Repositories/Bill/BillRepository.php@@ -327,9 +327,6 @@ class BillRepository implements BillRepositoryInterface/*** Get all journals that were recorded on this bill between these dates.- *- * @deprecated- ** @param Bill $bill* @param Carbon $start* @param Carbon $enddiff --git a/app/Repositories/Journal/JournalCollector.php b/app/Repositories/Journal/JournalCollector.phpindex 804b48c087..871563113b 100644--- a/app/Repositories/Journal/JournalCollector.php+++ b/app/Repositories/Journal/JournalCollector.php@@ -47,6 +47,7 @@ class JournalCollector}/**+ * @deprecated* @return Collection*/public function collect(): Collectiondiff --git a/app/Repositories/Journal/JournalRepositoryInterface.php b/app/Repositories/Journal/JournalRepositoryInterface.phpindex e70c40a0f7..ea4526806c 100644--- a/app/Repositories/Journal/JournalRepositoryInterface.php+++ b/app/Repositories/Journal/JournalRepositoryInterface.php@@ -86,12 +86,6 @@ interface JournalRepositoryInterface*/public function getWithDate(int $journalId, Carbon $date): TransactionJournal;- /**- * @param TransactionJournal $journal- * @param array $array- *- * @return void-/**** @param TransactionJournal $journaldiff --git a/app/Repositories/Tag/TagRepository.php b/app/Repositories/Tag/TagRepository.phpindex 14fea48a91..a9cbea562f 100644--- a/app/Repositories/Tag/TagRepository.php+++ b/app/Repositories/Tag/TagRepository.php@@ -110,45 +110,6 @@ class TagRepository implements TagRepositoryInterfacereturn false;}- /**- * @deprecated- * This method scans the transaction journals from or to the given asset account- * and checks if these are part of a balancing act. If so, it will sum up the amounts- * transferred into the balancing act (if any) and return this amount.- *- * This method effectively tells you the amount of money that has been balanced out- * correctly in the given period for the given account.- *- * @param Account $account- * @param Carbon $start- * @param Carbon $end- *- * @return string- */- public function coveredByBalancingActs(Account $account, Carbon $start, Carbon $end): string- {- // the quickest way to do this is by scanning all balancingAct tags- // because there will be less of them any way.- $tags = $this->user->tags()->where('tagMode', 'balancingAct')->get();- $amount = '0';-- /** @var Tag $tag */- foreach ($tags as $tag) {- $journals = $tag->transactionjournals()->after($start)->before($end)->transactionTypes([TransactionType::TRANSFER])->get(- ['transaction_journals.*']- );-- /** @var TransactionJournal $journal */- foreach ($journals as $journal) {- if (TransactionJournal::destinationAccount($journal)->id == $account->id) {- $amount = bcadd($amount, TransactionJournal::amount($journal));- }- }- }-- return $amount;- }-/*** @param Tag $tag*diff --git a/app/Repositories/Tag/TagRepositoryInterface.php b/app/Repositories/Tag/TagRepositoryInterface.phpindex 0520c1caaf..d8c1d33c05 100644--- a/app/Repositories/Tag/TagRepositoryInterface.php+++ b/app/Repositories/Tag/TagRepositoryInterface.php@@ -34,23 +34,6 @@ interface TagRepositoryInterface*/public function connect(TransactionJournal $journal, Tag $tag): bool;- /**- * @deprecated- * This method scans the transaction journals from or to the given asset account- * and checks if these are part of a balancing act. If so, it will sum up the amounts- * transferred into the balancing act (if any) and return this amount.- *- * This method effectively tells you the amount of money that has been balanced out- * correctly in the given period for the given account.- *- * @param Account $account- * @param Carbon $start- * @param Carbon $end- *- * @return string- */- public function coveredByBalancingActs(Account $account, Carbon $start, Carbon $end): string;-/*** @param Tag $tag*