Completed
Pull Request — develop (#640)
by Narcotic
08:00 queued 01:02
created

GravitonCoreBundle   B

Complexity

Total Complexity 2

Size/Duplication

Total Lines 44
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 18

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
c 1
b 0
f 0
lcom 0
cbo 18
dl 0
loc 44
rs 7.3333
ccs 21
cts 21
cp 1

2 Methods

Rating   Name   Duplication   Size   Complexity  
A build() 0 7 1
A getBundles() 0 19 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\RabbitMqBundle\GravitonRabbitMqBundle;
17
use Graviton\ProxyBundle\GravitonProxyBundle;
18
use Graviton\RestBundle\GravitonRestBundle;
19
use Graviton\SchemaBundle\GravitonSchemaBundle;
20
use Graviton\SecurityBundle\GravitonSecurityBundle;
21
use Graviton\SwaggerBundle\GravitonSwaggerBundle;
22
use Graviton\FileBundle\GravitonFileBundle;
23
use Graviton\MigrationBundle\GravitonMigrationBundle;
24
use Symfony\Component\HttpKernel\Bundle\Bundle;
25
use Graviton\CoreBundle\Compiler\VersionCompilerPass;
26
use Symfony\Component\DependencyInjection\ContainerBuilder;
27
28
/**
29
 * GravitonCoreBundle
30
 *
31
 * @author   List of contributors <https://github.com/libgraviton/graviton/graphs/contributors>
32
 * @license  https://opensource.org/licenses/MIT MIT License
33
 * @link     http://swisscom.ch
34
 */
35
class GravitonCoreBundle extends Bundle implements GravitonBundleInterface
36
{
37
    /**
38
     * {@inheritDoc}
39
     *
40
     * set up graviton symfony bundles
41
     *
42
     * @return \Symfony\Component\HttpKernel\Bundle\Bundle[]
0 ignored issues
show
Documentation introduced by
Consider making the return type a bit more specific; maybe use array<GravitonExceptionB...le|GravitonProxyBundle>.

This check looks for the generic type array as a return type and suggests a more specific type. This type is inferred from the actual code.

Loading history...
43
     */
44 8
    public function getBundles()
45
    {
46
        return array(
47 8
            new GravitonExceptionBundle(),
48 8
            new GravitonDocumentBundle(),
49 8
            new GravitonSchemaBundle(),
50 8
            new GravitonRestBundle(),
51 8
            new GravitonI18nBundle(),
52 8
            new GravitonGeneratorBundle(),
53 8
            new GravitonCacheBundle(),
54 8
            new GravitonLogBundle(),
55 8
            new GravitonSecurityBundle(),
56 8
            new GravitonSwaggerBundle(),
57 8
            new GravitonFileBundle(),
58 8
            new GravitonRabbitMqBundle(),
59 8
            new GravitonMigrationBundle(),
60 8
            new GravitonProxyBundle(),
61 4
        );
62
    }
63
64
    /**
65
     * load version compiler pass
66
     *
67
     * @param ContainerBuilder $container container builder
68
     *
69
     * @return void
70
     */
71 2
    public function build(ContainerBuilder $container)
72
    {
73 2
        parent::build($container);
74
75 2
        $container->addCompilerPass(new VersionCompilerPass());
76 2
        $container->addCompilerPass(new EnvParametersCompilerPass());
77 2
    }
78
}
79