updated packages

This commit is contained in:
2019-05-18 09:06:43 +00:00
parent 901d16349e
commit e9487fa58a
2025 changed files with 30366 additions and 49653 deletions

View File

@@ -21,12 +21,12 @@ use Symfony\Component\Translation\Exception\LogicException;
class IntlFormatter implements IntlFormatterInterface
{
private $hasMessageFormatter;
private $cache = array();
private $cache = [];
/**
* {@inheritdoc}
*/
public function formatIntl(string $message, string $locale, array $parameters = array()): string
public function formatIntl(string $message, string $locale, array $parameters = []): string
{
if (!$formatter = $this->cache[$locale][$message] ?? null) {
if (!($this->hasMessageFormatter ?? $this->hasMessageFormatter = class_exists(\MessageFormatter::class))) {
@@ -40,7 +40,7 @@ class IntlFormatter implements IntlFormatterInterface
}
foreach ($parameters as $key => $value) {
if (\in_array($key[0] ?? null, array('%', '{'), true)) {
if (\in_array($key[0] ?? null, ['%', '{'], true)) {
unset($parameters[$key]);
$parameters[trim($key, '%{ }')] = $value;
}