diff --git a/src/AbstractDatabase.php b/src/AbstractDatabase.php index 922bfeb4..db07c8dc 100644 --- a/src/AbstractDatabase.php +++ b/src/AbstractDatabase.php @@ -65,6 +65,8 @@ public function __construct( /** * ISO Standard Number + * + * @psalm-pure */ abstract public static function getISONumber(): string; diff --git a/src/Database/Countries.php b/src/Database/Countries.php index 368aa17f..c306e81d 100644 --- a/src/Database/Countries.php +++ b/src/Database/Countries.php @@ -12,6 +12,11 @@ */ class Countries extends AbstractNotPartitionedDatabase { + /** + * ISO Standard Number + * + * @psalm-pure + */ public static function getISONumber(): string { return '3166-1'; diff --git a/src/Database/Countries/Country.php b/src/Database/Countries/Country.php index e6296477..90caab77 100644 --- a/src/Database/Countries/Country.php +++ b/src/Database/Countries/Country.php @@ -19,6 +19,8 @@ class Country /** * @var string|null + * + * @psalm-allow-private-mutation */ private $localName; diff --git a/src/Database/Currencies.php b/src/Database/Currencies.php index e955ccdf..6932b6c2 100644 --- a/src/Database/Currencies.php +++ b/src/Database/Currencies.php @@ -12,6 +12,11 @@ */ class Currencies extends AbstractNotPartitionedDatabase { + /** + * ISO Standard Number + * + * @psalm-pure + */ public static function getISONumber(): string { return '4217'; diff --git a/src/Database/Currencies/Currency.php b/src/Database/Currencies/Currency.php index a1f2ff03..5495a4a8 100644 --- a/src/Database/Currencies/Currency.php +++ b/src/Database/Currencies/Currency.php @@ -31,6 +31,8 @@ class Currency /** * @var string|null + * + * @psalm-allow-private-mutation */ private $localName; diff --git a/src/Database/HistoricCountries.php b/src/Database/HistoricCountries.php index 9b26e8b7..af2414b7 100644 --- a/src/Database/HistoricCountries.php +++ b/src/Database/HistoricCountries.php @@ -12,6 +12,11 @@ */ class HistoricCountries extends AbstractNotPartitionedDatabase { + /** + * ISO Standard Number + * + * @psalm-pure + */ public static function getISONumber(): string { return '3166-3'; diff --git a/src/Database/HistoricCountries/Country.php b/src/Database/HistoricCountries/Country.php index dd32a4c0..6b1201c1 100644 --- a/src/Database/HistoricCountries/Country.php +++ b/src/Database/HistoricCountries/Country.php @@ -19,6 +19,8 @@ class Country /** * @var string|null + * + * @psalm-allow-private-mutation */ private $localName; diff --git a/src/Database/Languages.php b/src/Database/Languages.php index f6832807..12472c06 100644 --- a/src/Database/Languages.php +++ b/src/Database/Languages.php @@ -12,6 +12,11 @@ */ class Languages extends AbstractNotPartitionedDatabase implements LanguagesInterface { + /** + * ISO Standard Number + * + * @psalm-pure + */ public static function getISONumber(): string { return '639-3'; diff --git a/src/Database/Languages/Language.php b/src/Database/Languages/Language.php index 8a1ff129..53035d31 100644 --- a/src/Database/Languages/Language.php +++ b/src/Database/Languages/Language.php @@ -42,6 +42,8 @@ class Language /** * @var string|null + * + * @psalm-allow-private-mutation */ private $localName; diff --git a/src/Database/LanguagesPartitioned.php b/src/Database/LanguagesPartitioned.php index 242b861e..ef23dd4b 100644 --- a/src/Database/LanguagesPartitioned.php +++ b/src/Database/LanguagesPartitioned.php @@ -9,6 +9,11 @@ class LanguagesPartitioned extends AbstractPartitionedDatabase implements LanguagesInterface { + /** + * ISO Standard Number + * + * @psalm-pure + */ public static function getISONumber(): string { return '639-3'; diff --git a/src/Database/Scripts.php b/src/Database/Scripts.php index 70a9fd08..9c0f567a 100644 --- a/src/Database/Scripts.php +++ b/src/Database/Scripts.php @@ -12,6 +12,11 @@ */ class Scripts extends AbstractNotPartitionedDatabase { + /** + * ISO Standard Number + * + * @psalm-pure + */ public static function getISONumber(): string { return '15924'; diff --git a/src/Database/Scripts/Script.php b/src/Database/Scripts/Script.php index 944d595e..8151d4bc 100644 --- a/src/Database/Scripts/Script.php +++ b/src/Database/Scripts/Script.php @@ -19,6 +19,8 @@ class Script /** * @var string|null + * + * @psalm-allow-private-mutation */ private $localName; diff --git a/src/Database/Subdivisions.php b/src/Database/Subdivisions.php index e08b5b3d..b15f44df 100644 --- a/src/Database/Subdivisions.php +++ b/src/Database/Subdivisions.php @@ -12,6 +12,11 @@ */ class Subdivisions extends AbstractNotPartitionedDatabase implements SubdivisionsInterface { + /** + * ISO Standard Number + * + * @psalm-pure + */ public static function getISONumber(): string { return '3166-2'; diff --git a/src/Database/Subdivisions/Subdivision.php b/src/Database/Subdivisions/Subdivision.php index 041b63e1..86987811 100644 --- a/src/Database/Subdivisions/Subdivision.php +++ b/src/Database/Subdivisions/Subdivision.php @@ -19,6 +19,8 @@ class Subdivision /** * @var string|null + * + * @psalm-allow-private-mutation */ private $localName; diff --git a/src/Database/SubdivisionsPartitioned.php b/src/Database/SubdivisionsPartitioned.php index 27581c90..386c342d 100644 --- a/src/Database/SubdivisionsPartitioned.php +++ b/src/Database/SubdivisionsPartitioned.php @@ -9,6 +9,11 @@ class SubdivisionsPartitioned extends AbstractPartitionedDatabase implements SubdivisionsInterface { + /** + * ISO Standard Number + * + * @psalm-pure + */ public static function getISONumber(): string { return '3166-2'; diff --git a/src/TranslationDriver/DummyDriver.php b/src/TranslationDriver/DummyDriver.php index 216a1ea3..e4a09f75 100644 --- a/src/TranslationDriver/DummyDriver.php +++ b/src/TranslationDriver/DummyDriver.php @@ -19,6 +19,12 @@ public function setLocale(string $locale): void // do nothing } + /** + * @param string $isoNumber + * @param string $message + * + * @return string + */ public function translate(string $isoNumber, string $message): string { return $message; diff --git a/src/TranslationDriver/GettextExtensionDriver.php b/src/TranslationDriver/GettextExtensionDriver.php index 7deec449..797c7da4 100644 --- a/src/TranslationDriver/GettextExtensionDriver.php +++ b/src/TranslationDriver/GettextExtensionDriver.php @@ -39,6 +39,12 @@ public function setLocale(string $locale): void } } + /** + * @param string $isoNumber + * @param string $message + * + * @return string + */ public function translate(string $isoNumber, string $message): string { return \dgettext($isoNumber, $message); diff --git a/src/TranslationDriver/SymfonyTranslationDriver.php b/src/TranslationDriver/SymfonyTranslationDriver.php index 917251bd..811d13a2 100644 --- a/src/TranslationDriver/SymfonyTranslationDriver.php +++ b/src/TranslationDriver/SymfonyTranslationDriver.php @@ -78,6 +78,12 @@ public function setLocale(string $locale): void $this->translator->setLocale($locale); } + /** + * @param string $isoNumber + * @param string $message + * + * @return string + */ public function translate(string $isoNumber, string $message): string { return $this->translator->trans($message, [], $isoNumber); diff --git a/src/TranslationDriver/TranslatorInterface.php b/src/TranslationDriver/TranslatorInterface.php index 07457aae..c435d4af 100644 --- a/src/TranslationDriver/TranslatorInterface.php +++ b/src/TranslationDriver/TranslatorInterface.php @@ -6,5 +6,11 @@ interface TranslatorInterface { + /** + * @param string $isoNumber + * @param string $message + * + * @return string + */ public function translate(string $isoNumber, string $message): string; } \ No newline at end of file