TranslationBundle::build()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 5
Bugs 0 Features 0
Metric Value
cc 1
eloc 6
c 5
b 0
f 0
nc 1
nop 1
dl 0
loc 8
ccs 0
cts 8
cp 0
crap 2
rs 10
1
<?php
2
3
/*
4
 * This file is part of the PHP Translation package.
5
 *
6
 * (c) PHP Translation team <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Translation\Bundle;
13
14
use Symfony\Component\DependencyInjection\ContainerBuilder;
15
use Symfony\Component\HttpKernel\Bundle\Bundle;
16
use Translation\Bundle\DependencyInjection\CompilerPass\EditInPlacePass;
17
use Translation\Bundle\DependencyInjection\CompilerPass\ExternalTranslatorPass;
18
use Translation\Bundle\DependencyInjection\CompilerPass\ExtractorPass;
19
use Translation\Bundle\DependencyInjection\CompilerPass\StoragePass;
20
use Translation\Bundle\DependencyInjection\CompilerPass\SymfonyProfilerPass;
21
use Translation\Bundle\DependencyInjection\CompilerPass\ValidatorVisitorPass;
22
23
/**
24
 * @author Tobias Nyholm <[email protected]>
25
 */
26
class TranslationBundle extends Bundle
27
{
28
    public function build(ContainerBuilder $container): void
29
    {
30
        $container->addCompilerPass(new SymfonyProfilerPass());
31
        $container->addCompilerPass(new ValidatorVisitorPass());
32
        $container->addCompilerPass(new ExternalTranslatorPass());
33
        $container->addCompilerPass(new ExtractorPass());
34
        $container->addCompilerPass(new StoragePass());
35
        $container->addCompilerPass(new EditInPlacePass());
36
    }
37
}
38