comparison vendor/symfony/translation/DependencyInjection/TranslationExtractorPass.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
comparison
equal deleted inserted replaced
16:c2387f117808 17:129ea1e6d783
9 * file that was distributed with this source code. 9 * file that was distributed with this source code.
10 */ 10 */
11 11
12 namespace Symfony\Component\Translation\DependencyInjection; 12 namespace Symfony\Component\Translation\DependencyInjection;
13 13
14 use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
15 use Symfony\Component\DependencyInjection\ContainerBuilder;
16 use Symfony\Component\DependencyInjection\Exception\RuntimeException;
14 use Symfony\Component\DependencyInjection\Reference; 17 use Symfony\Component\DependencyInjection\Reference;
15 use Symfony\Component\DependencyInjection\ContainerBuilder;
16 use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
17 use Symfony\Component\DependencyInjection\Exception\RuntimeException;
18 18
19 /** 19 /**
20 * Adds tagged translation.extractor services to translation extractor. 20 * Adds tagged translation.extractor services to translation extractor.
21 */ 21 */
22 class TranslationExtractorPass implements CompilerPassInterface 22 class TranslationExtractorPass implements CompilerPassInterface
41 foreach ($container->findTaggedServiceIds($this->extractorTag, true) as $id => $attributes) { 41 foreach ($container->findTaggedServiceIds($this->extractorTag, true) as $id => $attributes) {
42 if (!isset($attributes[0]['alias'])) { 42 if (!isset($attributes[0]['alias'])) {
43 throw new RuntimeException(sprintf('The alias for the tag "translation.extractor" of service "%s" must be set.', $id)); 43 throw new RuntimeException(sprintf('The alias for the tag "translation.extractor" of service "%s" must be set.', $id));
44 } 44 }
45 45
46 $definition->addMethodCall('addExtractor', array($attributes[0]['alias'], new Reference($id))); 46 $definition->addMethodCall('addExtractor', [$attributes[0]['alias'], new Reference($id)]);
47 } 47 }
48 } 48 }
49 } 49 }