isExecuted() && true !== $this->option('force')) { $this->friendlyInfo('This command has already been executed.'); return 0; } $this->friendlyWarning('This command has been disabled.'); $this->markAsExecuted(); // $this->correctBalanceAmounts(); return 0; } private function correctBalanceAmounts(): void { AccountBalanceCalculator::recalculateAll(); } 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); } }