Code cleaning stuff.

This commit is contained in:
James Cole
2019-02-13 17:38:41 +01:00
parent 9a461fc7b7
commit 71fb9d8fa5
141 changed files with 495 additions and 482 deletions

View File

@@ -185,7 +185,6 @@ class CreateRecurringTransactions implements ShouldQueue
/** @var Processor $processor */
$processor = app(Processor::class);
$processor->make($rule);
/** @noinspection ExceptionsAnnotatingAndHandlingInspection */
$processor->handleTransactionJournal($journal);
if ($rule->stop_processing) {
return;
@@ -487,7 +486,7 @@ class CreateRecurringTransactions implements ShouldQueue
}
// has repeated X times.
$journalCount = $this->repository->getJournalCount($recurrence, null, null);
$journalCount = $this->repository->getJournalCount($recurrence);
if (0 !== $recurrence->repetitions && $journalCount >= $recurrence->repetitions) {
Log::info(sprintf('Recurrence #%d has run %d times, so will run no longer.', $recurrence->id, $recurrence->repetitions));

View File

@@ -165,9 +165,9 @@ class ExecuteRuleOnExistingTransactions extends Job implements ShouldQueue
/** @var Processor $processor */
$processor = app(Processor::class);
$processor->make($this->rule, true);
$hits = 0;
$misses = 0;
$total = 0;
$hits = 0;
$misses = 0;
$total = 0;
// Execute the rules for each transaction
foreach ($transactions as $transaction) {
++$total;