Completed
Pull Request — develop (#563)
by Narcotic
66:28
created

GravitonI18nBundle::build()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
dl 0
loc 6
ccs 0
cts 0
cp 0
rs 9.4285
c 1
b 0
f 0
cc 1
eloc 3
nc 1
nop 1
crap 2
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 18
     * @return \Symfony\Component\HttpKernel\Bundle\Bundle[]
28
     */
29 18
    public function getBundles()
30
    {
31
        return array();
32
    }
33
34
    /**
35
     * add our compiler pass
36
     *
37
     * @param ContainerBuilder $container container
38
     *
39
     * @return void
40
     */
41
    public function build(ContainerBuilder $container)
42
    {
43
        parent::build($container);
44
45
        $container->addCompilerPass(new ReplaceTranslatorCompilerPass());
46
    }
47
}
48