Completed
Push — master ( 8413a9...d75c00 )
by Narcotic
10:07
created

GravitonI18nBundle::build()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 6
ccs 4
cts 4
cp 1
rs 9.4285
cc 1
eloc 3
nc 1
nop 1
crap 1
1
<?php
2
/**
3
 * Graviton internationalization plugin
4
 */
5
6
namespace Graviton\I18nBundle;
7
8
use Graviton\I18nBundle\DependencyInjection\Compiler\ReplaceTranslatorCompilerPass;
9
use Symfony\Component\DependencyInjection\ContainerBuilder;
10
use Symfony\Component\HttpKernel\Bundle\Bundle;
11
use Graviton\BundleBundle\GravitonBundleInterface;
12
13
/**
14
 * Graviton internationalization plugin
15
 *
16
 * @author   List of contributors <https://github.com/libgraviton/graviton/graphs/contributors>
17
 * @license  http://opensource.org/licenses/gpl-license.php GNU Public License
18
 * @link     http://swisscom.ch
19
 */
20
class GravitonI18nBundle extends Bundle implements GravitonBundleInterface
21
{
22
    /**
23
     * {@inheritDoc}
24
     *
25
     * set up graviton symfony bundles
26
     *
27
     * @return \Symfony\Component\HttpKernel\Bundle\Bundle[]
28
     */
29 18
    public function getBundles()
30
    {
31 18
        return array();
32
    }
33
34
    /**
35
     * add our compiler pass
36
     *
37
     * @param ContainerBuilder $container container
38
     *
39
     * @return void
40
     */
41 2
    public function build(ContainerBuilder $container)
42
    {
43 2
        parent::build($container);
44
45 2
        $container->addCompilerPass(new ReplaceTranslatorCompilerPass());
46 2
    }
47
}
48