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

JMSTranslationBundlePass   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 2
c 0
b 0
f 0
lcom 0
cbo 3
dl 0
loc 15
ccs 9
cts 9
cp 1
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A process() 0 12 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