Completed
Push — master ( b47a4a...eecbc0 )
by Paweł
24s
created

SyliusCurrencyBundle::build()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 6
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 1
1
<?php
2
3
/*
4
 * This file is part of the Sylius package.
5
 *
6
 * (c) Paweł Jędrzejewski
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 Sylius\Bundle\CurrencyBundle;
13
14
use Sylius\Bundle\CurrencyBundle\DependencyInjection\Compiler\CompositeCurrencyContextPass;
15
use Sylius\Bundle\ResourceBundle\AbstractResourceBundle;
16
use Sylius\Bundle\ResourceBundle\SyliusResourceBundle;
17
use Symfony\Component\DependencyInjection\ContainerBuilder;
18
19
/**
20
 * @author Paweł Jędrzejewski <[email protected]>
21
 */
22
final class SyliusCurrencyBundle extends AbstractResourceBundle
23
{
24
    /**
25
     * @inheritDoc
26
     */
27
    public function build(ContainerBuilder $container)
28
    {
29
        parent::build($container);
30
31
        $container->addCompilerPass(new CompositeCurrencyContextPass());
32
    }
33
34
    /**
35
     * {@inheritdoc}
36
     */
37
    public function getSupportedDrivers()
38
    {
39
        return [
40
            SyliusResourceBundle::DRIVER_DOCTRINE_ORM,
41
            SyliusResourceBundle::DRIVER_DOCTRINE_MONGODB_ODM,
42
        ];
43
    }
44
45
    /**
46
     * {@inheritdoc}
47
     */
48
    protected function getModelNamespace()
49
    {
50
        return 'Sylius\Component\Currency\Model';
51
    }
52
}
53