From b8662f88995df2cbae655d4efe8f414eb3872e5e Mon Sep 17 00:00:00 2001 From: Luc SANCHEZ <4697568+ColonelMoutarde@users.noreply.github.com> Date: Fri, 14 Apr 2023 23:08:38 +0200 Subject: PHPstan level 6 for I18nFile.php (#5291) * PHPstan level 6 for I18nFile.php * Minor syntax * PHPstan level 6 for I18nFiles * PHPstan level 6 for I18nFiles * PHPstan level 6 for I18n Files * PHPstan level 6 for I18n Files * Fix several type errors --------- Co-authored-by: Luc Co-authored-by: Alexandre Alapetite --- cli/i18n/I18nValue.php | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) (limited to 'cli/i18n/I18nValue.php') diff --git a/cli/i18n/I18nValue.php b/cli/i18n/I18nValue.php index 8ca843b26..c4746de03 100644 --- a/cli/i18n/I18nValue.php +++ b/cli/i18n/I18nValue.php @@ -1,16 +1,18 @@ markAsTodo(); } - public function equal(I18nValue $value) { + public function equal(I18nValue $value): bool { return $this->value === $value->getValue(); } - public function isIgnore() { + public function isIgnore(): bool { return $this->state === self::STATE_IGNORE; } - public function isTodo() { + public function isTodo(): bool { return $this->state === self::STATE_TODO; } - public function markAsDirty() { + public function markAsDirty(): void { $this->state = self::STATE_DIRTY; } - public function markAsIgnore() { + public function markAsIgnore(): void { $this->state = self::STATE_IGNORE; } - public function markAsTodo() { + public function markAsTodo(): void { $this->state = self::STATE_TODO; } - public function unmarkAsIgnore() { + public function unmarkAsIgnore(): void { if ($this->state === self::STATE_IGNORE) { $this->state = null; } } - public function __toString() { + public function __toString(): string { if ($this->state === null) { return $this->value; } @@ -69,7 +71,7 @@ class I18nValue { return "{$this->value} -> {$this->state}"; } - public function getValue() { + public function getValue(): string { return $this->value; } } -- cgit v1.2.3