AppKernel::registerBundles()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 14
Code Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
cc 2
eloc 8
c 1
b 0
f 1
nc 2
nop 0
dl 0
loc 14
rs 10
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