Completed
Push — master ( 0a6dbe...603188 )
by Laurent
12:39
created

AppKernel   C

Complexity

Total Complexity 3

Size/Duplication

Total Lines 44
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 28

Importance

Changes 0
Metric Value
dl 0
loc 44
rs 5
c 0
b 0
f 0
wmc 3
lcom 1
cbo 28

2 Methods

Rating   Name   Duplication   Size   Complexity  
B registerBundles() 0 36 2
A registerContainerConfiguration() 0 4 1
1
<?php
2
3
use Symfony\Component\HttpKernel\Kernel;
4
use Symfony\Component\Config\Loader\LoaderInterface;
5
6
class AppKernel extends Kernel
7
{
8
    public function registerBundles()
9
    {
10
        $bundles = array(
11
            new Symfony\Bundle\FrameworkBundle\FrameworkBundle(),
12
            new Symfony\Bundle\SecurityBundle\SecurityBundle(),
13
            new Symfony\Bundle\TwigBundle\TwigBundle(),
14
            new Symfony\Bundle\MonologBundle\MonologBundle(),
15
            new Symfony\Bundle\SwiftmailerBundle\SwiftmailerBundle(),
16
            new Symfony\Bundle\AsseticBundle\AsseticBundle(),
17
            new Doctrine\Bundle\DoctrineBundle\DoctrineBundle(),
18
            new Doctrine\Bundle\FixturesBundle\DoctrineFixturesBundle(),
19
            new Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle(),
20
            new JMS\AopBundle\JMSAopBundle(),
21
            new JMS\SecurityExtraBundle\JMSSecurityExtraBundle(),
22
            new Stof\DoctrineExtensionsBundle\StofDoctrineExtensionsBundle(),
23
            new FOS\UserBundle\FOSUserBundle(),
24
            new Knp\Bundle\MarkdownBundle\KnpMarkdownBundle(),
25
            new Knp\Bundle\SnappyBundle\KnpSnappyBundle(),
26
            new Knp\Bundle\PaginatorBundle\KnpPaginatorBundle(),
27
            new Knp\Bundle\MenuBundle\KnpMenuBundle(),
28
            new Lexik\Bundle\FormFilterBundle\LexikFormFilterBundle(),
29
            new Misd\PhoneNumberBundle\MisdPhoneNumberBundle(),
30
            new AppBundle\AppBundle(),
31
        );
32
33
        if (in_array($this->getEnvironment(), array('dev', 'test'), true)) {
34
            $bundles[] = new Symfony\Bundle\DebugBundle\DebugBundle();
35
            $bundles[] = new Symfony\Bundle\WebProfilerBundle\WebProfilerBundle();
36
            $bundles[] = new Sensio\Bundle\DistributionBundle\SensioDistributionBundle();
37
            $bundles[] = new Sensio\Bundle\GeneratorBundle\SensioGeneratorBundle();
38
            $bundles[] = new PUGX\GeneratorBundle\PUGXGeneratorBundle();
39
            $bundles[] = new Bazinga\Bundle\FakerBundle\BazingaFakerBundle();
40
        }
41
42
        return $bundles;
43
    }
44
45
    public function registerContainerConfiguration(LoaderInterface $loader)
46
    {
47
        $loader->load($this->getRootDir().'/config/config_'.$this->getEnvironment().'.yml');
48
    }
49
}
50