Completed
Push — master ( 2329f6...21d34e )
by Lucas
13:38 queued 03:35
created

GravitonCoreBundle::getBundles()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 20
Code Lines 17

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 16
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 20
ccs 16
cts 16
cp 1
rs 9.4285
cc 1
eloc 17
nc 1
nop 0
crap 1
1
<?php
2
/**
3
 * core infrastructure like logging and framework.
4
 */
5
6
namespace Graviton\CoreBundle;
7
8
use Graviton\BundleBundle\GravitonBundleInterface;
9
use Graviton\CacheBundle\GravitonCacheBundle;
10
use Graviton\CoreBundle\Compiler\EnvParametersCompilerPass;
11
use Graviton\DocumentBundle\GravitonDocumentBundle;
12
use Graviton\ExceptionBundle\GravitonExceptionBundle;
13
use Graviton\GeneratorBundle\GravitonGeneratorBundle;
14
use Graviton\I18nBundle\GravitonI18nBundle;
15
use Graviton\LogBundle\GravitonLogBundle;
16
use Graviton\PersonBundle\GravitonPersonBundle;
17
use Graviton\RabbitMqBundle\GravitonRabbitMqBundle;
18
use Graviton\ProxyBundle\GravitonProxyBundle;
19
use Graviton\RestBundle\GravitonRestBundle;
20
use Graviton\SchemaBundle\GravitonSchemaBundle;
21
use Graviton\SecurityBundle\GravitonSecurityBundle;
22
use Graviton\SwaggerBundle\GravitonSwaggerBundle;
23
use Graviton\FileBundle\GravitonFileBundle;
24
use Graviton\MigrationBundle\GravitonMigrationBundle;
25
use Symfony\Component\HttpKernel\Bundle\Bundle;
26
use Graviton\CoreBundle\Compiler\VersionCompilerPass;
27
use Symfony\Component\DependencyInjection\ContainerBuilder;
28
29
/**
30
 * GravitonCoreBundle
31
 *
32
 * WARNING: Don't change me without changing Graviton\GeneratorBundle\Manipulator\BundleBundleManipulator
33
 *
34
 * @author   List of contributors <https://github.com/libgraviton/graviton/graphs/contributors>
35
 * @license  http://opensource.org/licenses/gpl-license.php GNU Public License
36
 * @link     http://swisscom.ch
37
 *
38
 * @see \Graviton\GeneratorBundle\Manipulator\BundleBundleManipulator
39
 */
40
class GravitonCoreBundle extends Bundle implements GravitonBundleInterface
41
{
42
    /**
43
     * {@inheritDoc}
44
     *
45
     * set up graviton symfony bundles
46
     *
47
     * @return \Symfony\Component\HttpKernel\Bundle\Bundle[]
48 13
     */
49
    public function getBundles()
50
    {
51 13
        return array(
52 13
            new GravitonExceptionBundle(),
53 13
            new GravitonDocumentBundle(),
54 13
            new GravitonSchemaBundle(),
55 13
            new GravitonRestBundle(),
56 13
            new GravitonI18nBundle(),
57 13
            new GravitonGeneratorBundle(),
58 13
            new GravitonPersonBundle(),
59 13
            new GravitonCacheBundle(),
60 13
            new GravitonLogBundle(),
61 13
            new GravitonSecurityBundle(),
62 13
            new GravitonSwaggerBundle(),
63 13
            new GravitonFileBundle(),
64 13
            new GravitonRabbitMqBundle(),
65 13
            new GravitonMigrationBundle(),
66 13
            new GravitonProxyBundle(),
67
        );
68
    }
69
70
    /**
71
     * load version compiler pass
72
     *
73
     * @param ContainerBuilder $container container builder
74
     *
75
     * @return void
76 1
     */
77
    public function build(ContainerBuilder $container)
78 1
    {
79
        parent::build($container);
80 1
81 1
        $container->addCompilerPass(new VersionCompilerPass());
82
        $container->addCompilerPass(new EnvParametersCompilerPass());
83
    }
84
}
85