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