AppKernel   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
eloc 10
c 1
b 0
f 1
dl 0
loc 21
rs 10
wmc 3

2 Methods

Rating   Name   Duplication   Size   Complexity  
A registerBundles() 0 14 2
A registerContainerConfiguration() 0 3 1
1
<?php
2
3
use Symfony\Component\Config\Loader\LoaderInterface;
4
use Symfony\Component\HttpKernel\Kernel;
5
6
class AppKernel extends Kernel
7
{
8
    public function registerBundles()
9
    {
10
        $bundles = [
11
            new Symfony\Bundle\FrameworkBundle\FrameworkBundle(),
12
            new Symfony\Bundle\MonologBundle\MonologBundle(),
13
            new Doctrine\Bundle\DoctrineBundle\DoctrineBundle(),
14
            new Janalis\Doctrineviz\DoctrinevizBundle(),
15
        ];
16
17
        if (in_array($this->getEnvironment(), ['dev', 'test'], true)) {
18
            $bundles[] = new Symfony\Bundle\DebugBundle\DebugBundle();
19
        }
20
21
        return $bundles;
22
    }
23
24
    public function registerContainerConfiguration(LoaderInterface $loader)
25
    {
26
        $loader->load($this->getRootDir().'/config/config_'.$this->getEnvironment().'.yml');
27
    }
28
}
29