diff --git a/src/SimplifiedTranslatable.php b/src/SimplifiedTranslatable.php index 074c9bf..15f59eb 100644 --- a/src/SimplifiedTranslatable.php +++ b/src/SimplifiedTranslatable.php @@ -3,9 +3,9 @@ interface SimplifiedTranslatable { - public function _t($text, array $replacements = null, $choice = null): string; + public function _t($text, array $replacements = null, $choice = null); - public function _p($singular, $plural, int $n, array $replacements = null): string; + public function _p($singular, $plural, int $n, array $replacements = null); - public function _sp($simplePlural, int $n, array $replacements = null): string; + public function _sp($simplePlural, int $n, array $replacements = null); } diff --git a/src/Translatable.php b/src/Translatable.php index e4d5160..7d55a10 100644 --- a/src/Translatable.php +++ b/src/Translatable.php @@ -11,5 +11,5 @@ interface Translatable * * @return string */ - public function _($msgId, $default, array $replacements = null, $choice = null): string; + public function _($msgId, $default, array $replacements = null, $choice = null); } diff --git a/src/TranslatableTrait.php b/src/TranslatableTrait.php index c90dfe1..941f1f0 100644 --- a/src/TranslatableTrait.php +++ b/src/TranslatableTrait.php @@ -14,17 +14,17 @@ abstract protected function _getTranslator(): Translator; '(o)' => 'oes', ]; - public function _($msgId, $default, array $replacements = null, $choice = null): string + public function _($msgId, $default, array $replacements = null, $choice = null) { return $this->_getTranslator()->_($msgId, $default, $replacements, $choice); } - public function _t($text, array $replacements = null, $choice = null): string + public function _t($text, array $replacements = null, $choice = null) { return $this->_getTranslator()->_(md5($text), $text, $replacements, $choice); } - public function _p($singular, $plural, int $n, array $replacements = null): string + public function _p($singular, $plural, int $n, array $replacements = null) { return $this->_getTranslator()->_( md5($singular . $plural), @@ -41,7 +41,7 @@ public function _p($singular, $plural, int $n, array $replacements = null): stri * * @return mixed */ - public function _sp($simplePlural, int $n, array $replacements = null): string + public function _sp($simplePlural, int $n, array $replacements = null) { return $this->_p( str_replace(array_keys(static::$replacements), '', $simplePlural),