Mercurial > hg > isophonics-drupal-site
diff vendor/symfony/translation/MessageSelector.php @ 17:129ea1e6d783
Update, including to Drupal core 8.6.10
author | Chris Cannam |
---|---|
date | Thu, 28 Feb 2019 13:21:36 +0000 |
parents | 1fec387a4317 |
children |
line wrap: on
line diff
--- a/vendor/symfony/translation/MessageSelector.php Tue Jul 10 15:07:59 2018 +0100 +++ b/vendor/symfony/translation/MessageSelector.php Thu Feb 28 13:21:36 2019 +0000 @@ -49,15 +49,15 @@ */ public function choose($message, $number, $locale) { - $parts = array(); + $parts = []; if (preg_match('/^\|++$/', $message)) { $parts = explode('|', $message); } elseif (preg_match_all('/(?:\|\||[^\|])++/', $message, $matches)) { $parts = $matches[0]; } - $explicitRules = array(); - $standardRules = array(); + $explicitRules = []; + $standardRules = []; foreach ($parts as $part) { $part = trim(str_replace('||', '|', $part)); @@ -82,7 +82,7 @@ if (!isset($standardRules[$position])) { // when there's exactly one rule given, and that rule is a standard // rule, use this rule - if (1 === count($parts) && isset($standardRules[0])) { + if (1 === \count($parts) && isset($standardRules[0])) { return $standardRules[0]; }