diff options
Diffstat (limited to 'cli/i18n/I18nData.php')
| -rw-r--r-- | cli/i18n/I18nData.php | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/cli/i18n/I18nData.php b/cli/i18n/I18nData.php index 6f841e947..7170765b7 100644 --- a/cli/i18n/I18nData.php +++ b/cli/i18n/I18nData.php @@ -3,6 +3,7 @@ declare(strict_types=1); class I18nData { + /** @var string */ public const REFERENCE_LANGUAGE = 'en'; /** @param array<string,array<string,array<string,I18nValue>>> $data */ @@ -74,22 +75,21 @@ class I18nData { /** * Return the available languages - * @return array<string> + * @return list<string> */ public function getAvailableLanguages(): array { $languages = array_keys($this->data); sort($languages); - return $languages; } /** * Return all available languages without the reference language - * @return array<string> + * @return list<string> */ private function getNonReferenceLanguages(): array { - return array_filter(array_keys($this->data), - static fn(string $value) => static::REFERENCE_LANGUAGE !== $value); + return array_values(array_filter(array_keys($this->data), + static fn(string $value) => static::REFERENCE_LANGUAGE !== $value)); } /** @@ -129,7 +129,7 @@ class I18nData { * Return the siblings for a specified key. * To get the siblings, we need to find all matches with the parent. * - * @return array<string> + * @return list<string> */ private function getSiblings(string $key): array { if (!array_key_exists($this->getFilenamePrefix($key), $this->data[static::REFERENCE_LANGUAGE])) { |
