Completed
Push — master ( 65f484...cb55bb )
by Asmir
07:37 queued 02:12
created

JMSTranslationBundlePass::process()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 12
Code Lines 8

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 9
CRAP Score 2

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 12
ccs 9
cts 9
cp 1
rs 9.4285
cc 2
eloc 8
nc 2
nop 1
crap 2
1
<?php
2
3
namespace Goetas\TwitalBundle\DependencyInjection\Compiler;
4
5
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
6
use Symfony\Component\DependencyInjection\ContainerBuilder;
7
use Symfony\Component\DependencyInjection\Reference;
8
9
/**
10
 *
11
 * @author Asmir Mustafic <[email protected]>
12
 *
13
 */
14
class JMSTranslationBundlePass implements CompilerPassInterface
15
{
16 7
    public function process(ContainerBuilder $container)
17
    {
18 7
        if ($container->hasDefinition('jms_translation.extractor.file.twig_extractor')) {
19 1
            $container->register('twital.translation.extractor.jms', 'Goetas\TwitalBundle\Translation\Jms\TwitalExtractor')
20 1
                ->setDecoratedService('jms_translation.extractor.file.twig_extractor', 'jms_translation.extractor.file.twig_extractor.inner')
21 1
                ->setArguments(array(
22 1
                    new Reference('twig'),
23 1
                    new Reference('twital.loader'),
24 1
                    new Reference('jms_translation.extractor.file.twig_extractor.inner'),
25
                ));
26
        }
27 7
    }
28
}
29
30