option('scope')) { $filters['scope'] = $scope; } $paginator = $this->service->list($filters, 100); $packs = $paginator->items(); if (empty($packs)) { $this->info('언어팩이 없습니다.'); return self::SUCCESS; } $rows = []; foreach ($packs as $pack) { $rows[] = [ $pack->identifier, $pack->scope, $pack->target_identifier ?? '-', $pack->locale, $pack->vendor, $pack->version, $this->formatStatus($pack), ]; } $this->table( ['Identifier', 'Scope', 'Target', 'Locale', 'Vendor', 'Version', 'Status'], $rows ); return self::SUCCESS; } /** * 표시용 상태 문자열을 만듭니다. 드리프트(active + 설치본 부재)는 명시적으로 표기합니다. * * @param LanguagePack $pack 대상 팩 * @return string 표시 상태 */ private function formatStatus(LanguagePack $pack): string { if ((bool) $pack->getAttribute('files_missing')) { return $pack->status.' (파일 없음)'; } return (string) $pack->status; } }