JMSTranslationBundlePass   A
last analyzed

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 Goetas\TwitalBundle\Translation\Jms\TwitalExtractor;
6
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
7
use Symfony\Component\DependencyInjection\ContainerBuilder;
8
use Symfony\Component\DependencyInjection\Reference;
9
10
/**
11
 *
12
 * @author Asmir Mustafic <[email protected]>
13
 *
14
 */
15
class JMSTranslationBundlePass implements CompilerPassInterface
16 7
{
17
    public function process(ContainerBuilder $container)
18 7
    {
19 1
        if ($container->hasDefinition('jms_translation.extractor.file.twig_extractor')) {
20 1
            $container->register('twital.translation.extractor.jms', TwitalExtractor::class)
21 1
                ->setDecoratedService('jms_translation.extractor.file.twig_extractor', 'jms_translation.extractor.file.twig_extractor.inner')
22 1
                ->setArguments(array(
23 1
                    new Reference('twig'),
24 1
                    new Reference('twital.loader'),
25
                    new Reference('jms_translation.extractor.file.twig_extractor.inner'),
26
                ));
27 7
        }
28
    }
29
}
30
31