option('period') ?: now()->subMonthNoOverflow()->format('Y-m')); $cutoff = (string) ($this->option('cutoff') ?: now()->format('Y-m-d')); $companyId = max(1, (int) $this->option('company')); $userId = $this->option('user') !== null ? (int) $this->option('user') : null; $result = $processor->process( (string) $this->argument('price-file'), $period, $cutoff, $companyId, $userId, ); $this->line(json_encode($result, JSON_UNESCAPED_UNICODE | JSON_PRETTY_PRINT)); return self::SUCCESS; } }