Completed
Push — master ( 5467e4...183ea4 )
by Boy
05:06 queued 01:02
created

AppKernel   C

Complexity

Total Complexity 3

Size/Duplication

Total Lines 42
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 24

Importance

Changes 2
Bugs 0 Features 0
Metric Value
wmc 3
c 2
b 0
f 0
lcom 1
cbo 24
dl 0
loc 42
rs 5.238

2 Methods

Rating   Name   Duplication   Size   Complexity  
B registerBundles() 0 32 2
A registerContainerConfiguration() 0 4 1
1
<?php
2
3
/**
4
 * Copyright 2014 SURFnet bv
5
 *
6
 * Licensed under the Apache License, Version 2.0 (the "License");
7
 * you may not use this file except in compliance with the License.
8
 * You may obtain a copy of the License at
9
 *
10
 *     http://www.apache.org/licenses/LICENSE-2.0
11
 *
12
 * Unless required by applicable law or agreed to in writing, software
13
 * distributed under the License is distributed on an "AS IS" BASIS,
14
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
 * See the License for the specific language governing permissions and
16
 * limitations under the License.
17
 */
18
19
use Symfony\Component\HttpKernel\Kernel;
20
use Symfony\Component\Config\Loader\LoaderInterface;
21
22
class AppKernel extends Kernel
23
{
24
    public function registerBundles()
25
    {
26
        $bundles = array(
27
            new Symfony\Bundle\FrameworkBundle\FrameworkBundle(),
28
            new Symfony\Bundle\SecurityBundle\SecurityBundle(),
29
            new Symfony\Bundle\TwigBundle\TwigBundle(),
30
            new Symfony\Bundle\MonologBundle\MonologBundle(),
31
            new Symfony\Bundle\SwiftmailerBundle\SwiftmailerBundle(),
32
            new Doctrine\Bundle\DoctrineBundle\DoctrineBundle(),
33
            new Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle(),
34
            new Nelmio\SecurityBundle\NelmioSecurityBundle(),
35
            new Doctrine\Bundle\MigrationsBundle\DoctrineMigrationsBundle(),
36
            new Surfnet\StepupMiddleware\CommandHandlingBundle\SurfnetStepupMiddlewareCommandHandlingBundle(),
37
            new Surfnet\StepupMiddleware\ApiBundle\SurfnetStepupMiddlewareApiBundle(),
38
            new Surfnet\StepupMiddleware\MiddlewareBundle\SurfnetStepupMiddlewareMiddlewareBundle(),
39
            new Surfnet\StepupBundle\SurfnetStepupBundle(),
40
            new Surfnet\StepupMiddleware\GatewayBundle\SurfnetStepupMiddlewareGatewayBundle(),
41
            new Surfnet\StepupMiddleware\ManagementBundle\SurfnetStepupMiddlewareManagementBundle(),
42
            new JMS\TranslationBundle\JMSTranslationBundle(),
43
            new JMS\DiExtraBundle\JMSDiExtraBundle($this),
44
            new JMS\AopBundle\JMSAopBundle(),
45
        );
46
47
        if (in_array($this->getEnvironment(), array('dev', 'test'))) {
48
            $bundles[] = new Symfony\Bundle\WebProfilerBundle\WebProfilerBundle();
49
            $bundles[] = new Sensio\Bundle\DistributionBundle\SensioDistributionBundle();
50
            $bundles[] = new Sensio\Bundle\GeneratorBundle\SensioGeneratorBundle();
51
            $bundles[] = new Liip\FunctionalTestBundle\LiipFunctionalTestBundle();
52
        }
53
54
        return $bundles;
55
    }
56
57
58
59
    public function registerContainerConfiguration(LoaderInterface $loader)
60
    {
61
        $loader->load(__DIR__.'/config/config_'.$this->getEnvironment().'.yml');
62
    }
63
}
64