isExecuted() && true !== $this->option('force')) { $this->friendlyInfo('This command has already been executed.'); return 0; } Artisan::call('correction:recalculate-pc-amounts'); $this->markAsExecuted(); return 0; } private function isExecuted(): bool { $configVar = app('fireflyconfig')->get(self::CONFIG_NAME, false); return (bool)$configVar?->data; } private function markAsExecuted(): void { app('fireflyconfig')->set(self::CONFIG_NAME, true); } }