Improve typing
This commit is contained in:
parent
d46563f994
commit
b8c88aecf5
6 changed files with 11 additions and 11 deletions
|
@ -135,14 +135,14 @@ class LocaleManager
|
|||
/**
|
||||
* Smarty "t" block.
|
||||
*
|
||||
* @param mixed[] $params Block parameters
|
||||
* @param string[]|string[][] $params Block parameters
|
||||
* @param string|null $text Block content
|
||||
*
|
||||
* @return string Translated string
|
||||
*/
|
||||
public function smartyTranslate(array $params, string $text = null): string
|
||||
{
|
||||
if (isset($params['params'])) {
|
||||
if (isset($params['params']) && is_array($params['params'])) {
|
||||
return $this->t($text, $params['params']);
|
||||
} else {
|
||||
return $this->t($text);
|
||||
|
@ -154,7 +154,7 @@ class LocaleManager
|
|||
*
|
||||
* @param string|null $string $string String to translate
|
||||
*
|
||||
* @param mixed[] $params
|
||||
* @param string[] $params
|
||||
* @return string Translated string
|
||||
*/
|
||||
public function t(string $string = null, array $params = []): string
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue