mark($check['level']), $check['title'], $check['value']]; } $this->table(['', 'Проверка', 'Значение'], $rows); $hints = array_filter($checks, static fn (array $check): bool => $check['hint'] !== ''); if ($hints !== []) { $this->line(''); $this->line('Что сделать:'); foreach ($hints as $check) { $this->line(' ' . $check['title'] . ': ' . $check['hint']); } } return Diagnostics::worst($checks) === Diagnostics::ERROR ? 1 : 0; } private function mark(string $level): string { return match ($level) { Diagnostics::ERROR => '[!]', Diagnostics::WARN => '[~]', default => '[+]', }; } }