summaryrefslogtreecommitdiff
path: root/vendor/symfony/translation
diff options
context:
space:
mode:
authorGreg Roach <fisharebest@webtrees.net>2019-07-13 22:13:09 +0100
committerGreg Roach <fisharebest@webtrees.net>2019-07-13 22:13:09 +0100
commitea75abda1c0370fb1de46fb302c8871017f17632 (patch)
tree6ad700e0af225680cbeb9349882aa77f9292f5e9 /vendor/symfony/translation
parentd0bcc06fc828c5fd8500d82c2aef6b766eb1c443 (diff)
downloadwebtrees-ea75abda1c0370fb1de46fb302c8871017f17632.tar.gz
webtrees-ea75abda1c0370fb1de46fb302c8871017f17632.tar.bz2
webtrees-ea75abda1c0370fb1de46fb302c8871017f17632.zip
Update vendor dependencies
Diffstat (limited to 'vendor/symfony/translation')
-rw-r--r--vendor/symfony/translation/DependencyInjection/TranslatorPathsPass.php2
-rw-r--r--vendor/symfony/translation/Extractor/PhpExtractor.php2
-rw-r--r--vendor/symfony/translation/LoggingTranslator.php4
-rw-r--r--vendor/symfony/translation/PluralizationRules.php2
-rw-r--r--vendor/symfony/translation/Resources/bin/translation-status.php8
-rw-r--r--vendor/symfony/translation/Translator.php2
6 files changed, 12 insertions, 8 deletions
diff --git a/vendor/symfony/translation/DependencyInjection/TranslatorPathsPass.php b/vendor/symfony/translation/DependencyInjection/TranslatorPathsPass.php
index d9fc71911f..8ff2587dd5 100644
--- a/vendor/symfony/translation/DependencyInjection/TranslatorPathsPass.php
+++ b/vendor/symfony/translation/DependencyInjection/TranslatorPathsPass.php
@@ -46,7 +46,7 @@ class TranslatorPathsPass extends AbstractRecursivePass
}
foreach ($this->findControllerArguments($container) as $controller => $argument) {
- $id = \substr($controller, 0, \strpos($controller, ':') ?: \strlen($controller));
+ $id = substr($controller, 0, strpos($controller, ':') ?: \strlen($controller));
if ($container->hasDefinition($id)) {
list($locatorRef) = $argument->getValues();
$this->controllers[(string) $locatorRef][$container->getDefinition($id)->getClass()] = true;
diff --git a/vendor/symfony/translation/Extractor/PhpExtractor.php b/vendor/symfony/translation/Extractor/PhpExtractor.php
index 84fd7400f8..3e1a152533 100644
--- a/vendor/symfony/translation/Extractor/PhpExtractor.php
+++ b/vendor/symfony/translation/Extractor/PhpExtractor.php
@@ -204,7 +204,7 @@ class PhpExtractor extends AbstractFileExtractor implements ExtractorInterface
if (\func_num_args() < 3 && __CLASS__ !== \get_class($this) && __CLASS__ !== (new \ReflectionMethod($this, __FUNCTION__))->getDeclaringClass()->getName() && !$this instanceof \PHPUnit\Framework\MockObject\MockObject && !$this instanceof \Prophecy\Prophecy\ProphecySubjectInterface) {
@trigger_error(sprintf('The "%s()" method will have a new "string $filename" argument in version 5.0, not defining it is deprecated since Symfony 4.3.', __METHOD__), E_USER_DEPRECATED);
}
- $filename = 2 < \func_num_args() ? \func_get_arg(2) : '';
+ $filename = 2 < \func_num_args() ? func_get_arg(2) : '';
$tokenIterator = new \ArrayIterator($tokens);
diff --git a/vendor/symfony/translation/LoggingTranslator.php b/vendor/symfony/translation/LoggingTranslator.php
index 3a84bf1170..2996167d08 100644
--- a/vendor/symfony/translation/LoggingTranslator.php
+++ b/vendor/symfony/translation/LoggingTranslator.php
@@ -84,6 +84,10 @@ class LoggingTranslator implements TranslatorInterface, LegacyTranslatorInterfac
{
$prev = $this->translator->getLocale();
$this->translator->setLocale($locale);
+ if ($prev === $locale) {
+ return;
+ }
+
$this->logger->debug(sprintf('The locale of the translator has changed from "%s" to "%s".', $prev, $locale));
}
diff --git a/vendor/symfony/translation/PluralizationRules.php b/vendor/symfony/translation/PluralizationRules.php
index ee8609fada..77c276073f 100644
--- a/vendor/symfony/translation/PluralizationRules.php
+++ b/vendor/symfony/translation/PluralizationRules.php
@@ -32,7 +32,7 @@ class PluralizationRules
*/
public static function get($number, $locale/*, bool $triggerDeprecation = true*/)
{
- if (3 > \func_num_args() || \func_get_arg(2)) {
+ if (3 > \func_num_args() || func_get_arg(2)) {
@trigger_error(sprintf('The "%s" class is deprecated since Symfony 4.2.', __CLASS__), E_USER_DEPRECATED);
}
diff --git a/vendor/symfony/translation/Resources/bin/translation-status.php b/vendor/symfony/translation/Resources/bin/translation-status.php
index 0d37c3e0aa..96ccc10574 100644
--- a/vendor/symfony/translation/Resources/bin/translation-status.php
+++ b/vendor/symfony/translation/Resources/bin/translation-status.php
@@ -73,7 +73,7 @@ foreach ($config['original_files'] as $originalFilePath) {
$translationStatus = calculateTranslationStatus($originalFilePath, $translationFilePaths);
$totalMissingTranslations += array_sum(array_map(function ($translation) {
- return \count($translation['missingKeys']);
+ return count($translation['missingKeys']);
}, array_values($translationStatus)));
printTranslationStatus($originalFilePath, $translationStatus, $config['verbose_output']);
@@ -113,8 +113,8 @@ function calculateTranslationStatus($originalFilePath, $translationFilePaths)
$missingKeys = array_diff_key($allTranslationKeys, $translatedKeys);
$translationStatus[$locale] = [
- 'total' => \count($allTranslationKeys),
- 'translated' => \count($translatedKeys),
+ 'total' => count($allTranslationKeys),
+ 'translated' => count($translatedKeys),
'missingKeys' => $missingKeys,
];
}
@@ -176,7 +176,7 @@ function printTable($translations, $verboseOutput)
textColorNormal();
- if (true === $verboseOutput && \count($translation['missingKeys']) > 0) {
+ if (true === $verboseOutput && count($translation['missingKeys']) > 0) {
echo str_repeat('-', 80).PHP_EOL;
echo '| Missing Translations:'.PHP_EOL;
diff --git a/vendor/symfony/translation/Translator.php b/vendor/symfony/translation/Translator.php
index f5ce39ef0d..9846c8338b 100644
--- a/vendor/symfony/translation/Translator.php
+++ b/vendor/symfony/translation/Translator.php
@@ -433,7 +433,7 @@ EOF
protected function computeFallbackLocales($locale)
{
if (null === $this->parentLocales) {
- $parentLocales = \json_decode(\file_get_contents(__DIR__.'/Resources/data/parents.json'), true);
+ $parentLocales = json_decode(file_get_contents(__DIR__.'/Resources/data/parents.json'), true);
}
$locales = [];