diff options
Diffstat (limited to 'cli')
| -rw-r--r-- | cli/i18n/I18nCompletionValidator.php | 3 | ||||
| -rw-r--r-- | cli/i18n/I18nUsageValidator.php | 3 | ||||
| -rw-r--r-- | cli/i18n/I18nValue.php | 1 |
3 files changed, 7 insertions, 0 deletions
diff --git a/cli/i18n/I18nCompletionValidator.php b/cli/i18n/I18nCompletionValidator.php index 4a8e54759..2a42dc13f 100644 --- a/cli/i18n/I18nCompletionValidator.php +++ b/cli/i18n/I18nCompletionValidator.php @@ -22,6 +22,7 @@ class I18nCompletionValidator implements I18nValidatorInterface { $this->language = $language; } + #[\Override] public function displayReport(): string { if ($this->passEntries > $this->totalEntries) { throw new \RuntimeException('The number of translated strings cannot be higher than the number of strings'); @@ -32,10 +33,12 @@ class I18nCompletionValidator implements I18nValidatorInterface { return sprintf('Translation is %5.1f%% complete.', $this->passEntries / $this->totalEntries * 100) . PHP_EOL; } + #[\Override] public function displayResult(): string { return $this->result; } + #[\Override] public function validate(): bool { foreach ($this->reference as $file => $data) { foreach ($data as $refKey => $refValue) { diff --git a/cli/i18n/I18nUsageValidator.php b/cli/i18n/I18nUsageValidator.php index 1267cd66d..dd514236b 100644 --- a/cli/i18n/I18nUsageValidator.php +++ b/cli/i18n/I18nUsageValidator.php @@ -22,6 +22,7 @@ class I18nUsageValidator implements I18nValidatorInterface { $this->reference = $reference; } + #[\Override] public function displayReport(): string { if ($this->failedEntries > $this->totalEntries) { throw new \RuntimeException('The number of unused strings cannot be higher than the number of strings'); @@ -32,10 +33,12 @@ class I18nUsageValidator implements I18nValidatorInterface { return sprintf('%5.1f%% of translation keys are unused.', $this->failedEntries / $this->totalEntries * 100) . PHP_EOL; } + #[\Override] public function displayResult(): string { return $this->result; } + #[\Override] public function validate(): bool { foreach ($this->reference as $file => $data) { foreach ($data as $key => $value) { diff --git a/cli/i18n/I18nValue.php b/cli/i18n/I18nValue.php index 88d0ea494..03e7676ae 100644 --- a/cli/i18n/I18nValue.php +++ b/cli/i18n/I18nValue.php @@ -66,6 +66,7 @@ class I18nValue { } } + #[\Override] public function __toString(): string { if ($this->state === null) { return $this->value; |
