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

@@ -58,10 +58,8 @@ class BudgetLimitCurrency extends Command
*/
public function handle(): int
{
$start = microtime(true);
if ($this->isExecuted() && true !== $this->option('force')) {
$this->warn('This command has already been executed.');
$this->warn('Correct: this command has already been executed.');
return 0;
}
@@ -88,11 +86,8 @@ class BudgetLimitCurrency extends Command
}
}
if (0 === $count) {
$this->info('All budget limits are correct.');
$this->info('Correct: all budget limits are OK.');
}
$end = round(microtime(true) - $start, 2);
$this->info(sprintf('Verified budget limits in %s seconds.', $end));
$this->markAsExecuted();
return 0;