public function trans(string|\Stringable|TranslatableInterface|null
$message, array|string
$arguments =
[], string
$domain = null, string
$locale = null, int
$count = null
): string
{ if ($message instanceof TranslatableInterface
) { if ([] !==
$arguments && !\
is_string($arguments)) { throw new \
TypeError(sprintf('Argument 2 passed to "%s()" must be a locale passed as a string when the message is a "%s", "%s" given.', __METHOD__, TranslatableInterface::
class,
get_debug_type($arguments)));
} if ($message instanceof TranslatableMessage && '' ===
$message->
getMessage()) { return '';
} return $message->
trans($this->
getTranslator(),
$locale ?? (\
is_string($arguments) ?
$arguments : null
));
} if (!\
is_array($arguments)) { throw new \
TypeError(sprintf('Unless the message is a "%s", argument 2 passed to "%s()" must be an array of parameters, "%s" given.', TranslatableInterface::
class, __METHOD__,
get_debug_type($arguments)));
} if ('' ===
$message =
(string) $message) { return '';
} if (null !==
$count) {