updated packages
This commit is contained in:
@@ -42,7 +42,7 @@ class MessageFormatter implements MessageFormatterInterface, IntlFormatterInterf
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function format($message, $locale, array $parameters = array())
|
||||
public function format($message, $locale, array $parameters = [])
|
||||
{
|
||||
if ($this->translator instanceof TranslatorInterface) {
|
||||
return $this->translator->trans($message, $parameters, null, $locale);
|
||||
@@ -54,7 +54,7 @@ class MessageFormatter implements MessageFormatterInterface, IntlFormatterInterf
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function formatIntl(string $message, string $locale, array $parameters = array()): string
|
||||
public function formatIntl(string $message, string $locale, array $parameters = []): string
|
||||
{
|
||||
return $this->intlFormatter->formatIntl($message, $locale, $parameters);
|
||||
}
|
||||
@@ -64,16 +64,16 @@ class MessageFormatter implements MessageFormatterInterface, IntlFormatterInterf
|
||||
*
|
||||
* @deprecated since Symfony 4.2, use format() with a %count% parameter instead
|
||||
*/
|
||||
public function choiceFormat($message, $number, $locale, array $parameters = array())
|
||||
public function choiceFormat($message, $number, $locale, array $parameters = [])
|
||||
{
|
||||
@trigger_error(sprintf('The "%s()" method is deprecated since Symfony 4.2, use the format() one instead with a %%count%% parameter.', __METHOD__), E_USER_DEPRECATED);
|
||||
|
||||
$parameters = array('%count%' => $number) + $parameters;
|
||||
$parameters = ['%count%' => $number] + $parameters;
|
||||
|
||||
if ($this->translator instanceof TranslatorInterface) {
|
||||
return $this->format($message, $locale, $parameters);
|
||||
}
|
||||
|
||||
return $this->format($this->translator->transChoice($message, $number, array(), null, $locale), $locale, $parameters);
|
||||
return $this->format($this->translator->transChoice($message, $number, [], null, $locale), $locale, $parameters);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user