cleanup: Commands are a lot less verbal and report better on success / failue

This commit is contained in:
James Cole
2023-06-02 07:36:17 +02:00
parent 1e1497ff4e
commit dcf71c6fdf
60 changed files with 1108 additions and 1698 deletions

View File

@@ -63,7 +63,6 @@ class DeleteEmptyJournals extends Command
private function deleteEmptyJournals(): void
{
$start = microtime(true);
$count = 0;
$set = TransactionJournal::leftJoin('transactions', 'transactions.transaction_journal_id', '=', 'transaction_journals.id')
->groupBy('transaction_journals.id')
@@ -82,10 +81,8 @@ class DeleteEmptyJournals extends Command
++$count;
}
if (0 === $count) {
$this->info('No empty transaction journals.');
$this->info('Correct: no empty transaction journals.');
}
$end = round(microtime(true) - $start, 2);
$this->info(sprintf('Verified empty journals in %s seconds', $end));
}
/**
@@ -115,7 +112,7 @@ class DeleteEmptyJournals extends Command
}
}
if (0 === $total) {
$this->info('No uneven transaction journals.');
$this->info('Correct: no uneven transaction journals.');
}
}
}