Completed
Push — master ( 2feeb8...ed2d61 )
by Nikola
15:39
created

ExchangeRateBundle::getContainerExtension()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
ccs 2
cts 2
cp 1
cc 1
eloc 2
nc 1
nop 0
crap 1
1
<?php
2
/*
3
 * This file is part of the Exchange Rate Bundle, an RunOpenCode project.
4
 *
5
 * (c) 2017 RunOpenCode
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 */
10
namespace RunOpenCode\Bundle\ExchangeRate;
11
12
use RunOpenCode\Bundle\ExchangeRate\DependencyInjection\CompilerPass\ProcessorsCompilerPass;
13
use RunOpenCode\Bundle\ExchangeRate\DependencyInjection\CompilerPass\RatesConfigurationRegistryCompilerPass;
14
use RunOpenCode\Bundle\ExchangeRate\DependencyInjection\CompilerPass\RepositoryCompilerPass;
15
use RunOpenCode\Bundle\ExchangeRate\DependencyInjection\CompilerPass\SourcesCompilerPass;
16
use RunOpenCode\Bundle\ExchangeRate\DependencyInjection\Extension;
17
use Symfony\Component\DependencyInjection\ContainerBuilder;
18
use Symfony\Component\HttpKernel\Bundle\Bundle;
19
20
/**
21
 * Class ExchangeRateBundle
22
 *
23
 * A Bundle.
24
 *
25
 * @package RunOpenCode\Bundle\ExchangeRate
26
 */
27
class ExchangeRateBundle extends Bundle
28
{
29
    /**
30
     * {@inheritdoc}
31
     */
32 1
    public function getContainerExtension()
33
    {
34 1
        return new Extension();
35
    }
36
37
    public function build(ContainerBuilder $container)
38
    {
39
        $container
40
            ->addCompilerPass(new RepositoryCompilerPass())
41
            ->addCompilerPass(new SourcesCompilerPass())
42
            ->addCompilerPass(new ProcessorsCompilerPass())
43
            ->addCompilerPass(new RatesConfigurationRegistryCompilerPass());
44
    }
45
}
46