Passed
Push — master ( 9b9be7...468f99 )
by Dan
04:07 queued 10s
created

AppKernel   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
wmc 3
eloc 9
c 2
b 0
f 0
dl 0
loc 22
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A registerBundles() 0 10 1
A registerContainerConfiguration() 0 3 1
A getProjectDir() 0 3 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\TwigBundle\TwigBundle(),
13
            new Doctrine\Bundle\DoctrineBundle\DoctrineBundle(),
14
            new Knp\FcTestBundle\KnpFcTestBundle(),
15
        );
16
17
        return $bundles;
18
    }
19
20
    public function registerContainerConfiguration(LoaderInterface $loader)
21
    {
22
        $loader->load($this->getProjectDir() . '/app/config/config_' . $this->getEnvironment() . '.yml');
23
    }
24
25
    public function getProjectDir()
26
    {
27
        return realpath(__DIR__ . '/../');
28
    }
29
}
30