This commit is contained in:
2025-05-12 14:25:25 +02:00
parent ab2db755ef
commit 9e378ca2b7
2719 changed files with 46505 additions and 60181 deletions

View File

@@ -23,7 +23,7 @@ class TranslatableMessage implements TranslatableInterface
private array $parameters;
private ?string $domain;
public function __construct(string $message, array $parameters = [], string $domain = null)
public function __construct(string $message, array $parameters = [], ?string $domain = null)
{
$this->message = $message;
$this->parameters = $parameters;
@@ -50,7 +50,7 @@ class TranslatableMessage implements TranslatableInterface
return $this->domain;
}
public function trans(TranslatorInterface $translator, string $locale = null): string
public function trans(TranslatorInterface $translator, ?string $locale = null): string
{
return $translator->trans($this->getMessage(), array_map(
static fn ($parameter) => $parameter instanceof TranslatableInterface ? $parameter->trans($translator, $locale) : $parameter,