subMonthNoOverflow(); $year = (int) ($this->option('year') ?: $reference->year); $month = (int) ($this->option('month') ?: $reference->month); $this->info("Gerando TBR automático para {$month}/{$year}..."); $result = $service->generateBatch($year, $month, null); $this->info(sprintf( '%d gerado(s), %d pulado(s), %d erro(s).', $result['generated_count'], $result['skipped_count'], $result['error_count'], )); return self::SUCCESS; } }