Completed
Pull Request — master (#16)
by Nikola
01:29
created

AppKernel   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 4

Importance

Changes 0
Metric Value
wmc 5
c 0
b 0
f 0
lcom 0
cbo 4
dl 0
loc 30
rs 10

5 Methods

Rating   Name   Duplication   Size   Complexity  
A registerBundles() 0 7 1
A getRootDir() 0 4 1
A getCacheDir() 0 4 1
A getLogDir() 0 4 1
A registerContainerConfiguration() 0 4 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
        return [
11
            new Go\Symfony\GoAopBundle\GoAopBundle(),
12
            new Symfony\Bundle\FrameworkBundle\FrameworkBundle(),
13
        ];
14
    }
15
16
    public function getRootDir()
17
    {
18
        return __DIR__;
19
    }
20
21
    public function getCacheDir()
22
    {
23
        return dirname(__DIR__).'/var/cache/'.$this->getEnvironment();
24
    }
25
26
    public function getLogDir()
27
    {
28
        return dirname(__DIR__).'/var/logs';
29
    }
30
31
    public function registerContainerConfiguration(LoaderInterface $loader)
32
    {
33
        $loader->load($this->getRootDir().'/config/config.yml');
34
    }
35
}
36