Completed
Push — master ( e9cd97...23520c )
by Rafał
23:17
created

SWPBridgeBundle   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 4

Importance

Changes 4
Bugs 2 Features 2
Metric Value
wmc 3
c 4
b 2
f 2
lcom 0
cbo 4
dl 0
loc 30
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A build() 0 6 1
A getSupportedDrivers() 0 6 1
A getModelClassNamespace() 0 4 1
1
<?php
2
3
/**
4
 * This file is part of the Superdesk Web Publisher Bridge Bundle.
5
 *
6
 * Copyright 2016 Sourcefabric z.ú. and contributors.
7
 *
8
 * For the full copyright and license information, please see the
9
 * AUTHORS and LICENSE files distributed with this source code.
10
 *
11
 * @copyright 2016 Sourcefabric z.ú.
12
 * @license http://www.superdesk.org/license
13
 */
14
namespace SWP\Bundle\BridgeBundle;
15
16
use SWP\Bundle\BridgeBundle\DependencyInjection\Compiler\TransformersCompilerPass;
17
use SWP\Bundle\BridgeBundle\DependencyInjection\Compiler\ValidatorsCompilerPass;
18
use SWP\Bundle\StorageBundle\DependencyInjection\Bundle\Bundle;
19
use SWP\Bundle\StorageBundle\Drivers;
20
use Symfony\Component\DependencyInjection\ContainerBuilder;
21
22
class SWPBridgeBundle extends Bundle
23
{
24
    /**
25
     * {@inheritdoc}
26
     */
27
    public function build(ContainerBuilder $container)
28
    {
29
        parent::build($container);
30
        $container->addCompilerPass(new ValidatorsCompilerPass());
31
        $container->addCompilerPass(new TransformersCompilerPass());
32
    }
33
34
    /**
35
     * {@inheritdoc}
36
     */
37
    public function getSupportedDrivers()
38
    {
39
        return [
40
            Drivers::DRIVER_DOCTRINE_ORM,
41
        ];
42
    }
43
44
    /**
45
     * {@inheritdoc}
46
     */
47
    public function getModelClassNamespace()
48
    {
49
        return 'SWP\Component\Bridge\Model';
50
    }
51
}
52