check(); } catch (Throwable $exception) { $this->error('预警检查失败:' . $exception->getMessage()); return self::FAILURE; } if ($summary === []) { $this->info('预警检查完成:没有发现需要处理的记录。'); return self::SUCCESS; } $this->table( ['预警类型', '本次检查命中'], collect($summary)->map(fn (int $count, string $type): array => [$type, $count])->values()->all(), ); return self::SUCCESS; } }