SWPBridgeBundle   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 31
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 4

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 4
dl 0
loc 31
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A build() 0 7 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
15
namespace SWP\Bundle\BridgeBundle;
16
17
use SWP\Bundle\BridgeBundle\DependencyInjection\Compiler\TransformersCompilerPass;
18
use SWP\Bundle\BridgeBundle\DependencyInjection\Compiler\ValidatorsCompilerPass;
19
use SWP\Bundle\StorageBundle\DependencyInjection\Bundle\Bundle;
20
use SWP\Bundle\StorageBundle\Drivers;
21
use Symfony\Component\DependencyInjection\ContainerBuilder;
22
23
class SWPBridgeBundle extends Bundle
24
{
25
    /**
26
     * {@inheritdoc}
27
     */
28
    public function build(ContainerBuilder $container)
29
    {
30
        parent::build($container);
31
32
        $container->addCompilerPass(new ValidatorsCompilerPass());
33
        $container->addCompilerPass(new TransformersCompilerPass());
34
    }
35
36
    /**
37
     * {@inheritdoc}
38
     */
39
    public function getSupportedDrivers()
40
    {
41
        return [
42
            Drivers::DRIVER_DOCTRINE_ORM,
43
        ];
44
    }
45
46
    /**
47
     * {@inheritdoc}
48
     */
49
    public function getModelClassNamespace()
50
    {
51
        return 'SWP\Component\Bridge\Model';
52
    }
53
}
54