'Maximum records to process per run (default: 50).', ]; public function run(array $params) { $limit = (int) (CLI::getOption('limit') ?? 50); if ($limit <= 0) { $limit = 50; } $service = new BridgeSyncService(); $summary = $service->processPending($limit, 'spark-bridge-sync'); CLI::write('Bridge Sync Result', 'yellow'); CLI::write('Processed: ' . (int) ($summary['processed'] ?? 0)); CLI::write('Sent: ' . (int) ($summary['sent'] ?? 0), 'green'); CLI::write('Failed: ' . (int) ($summary['failed'] ?? 0), ((int) ($summary['failed'] ?? 0) > 0 ? 'red' : 'green')); CLI::write('Skipped: ' . (int) ($summary['skipped'] ?? 0)); CLI::write('Message: ' . (string) ($summary['message'] ?? '')); } }