AppKernel   A
last analyzed

Complexity

Total Complexity 5

Size/Duplication

Total Lines 33
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 5

Importance

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

5 Methods

Rating   Name   Duplication   Size   Complexity  
A registerBundles() 0 10 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
namespace Psi\Bundle\Description\Example\app;
4
5
use Symfony\Component\Config\Loader\LoaderInterface;
6
use Symfony\Component\HttpKernel\Kernel;
7
8
class AppKernel extends Kernel
9
{
10
    public function registerBundles()
11
    {
12
        $bundles = [
13
            new \Symfony\Bundle\FrameworkBundle\FrameworkBundle(),
14
            new \Symfony\Bundle\TwigBundle\TwigBundle(),
15
            new \Psi\Bundle\Description\PsiDescriptionBundle(),
16
        ];
17
18
        return $bundles;
19
    }
20
21
    public function getRootDir()
22
    {
23
        return __DIR__;
24
    }
25
26
    public function getCacheDir()
27
    {
28
        return dirname(__DIR__).'/var/cache/'.$this->getEnvironment();
29
    }
30
31
    public function getLogDir()
32
    {
33
        return dirname(__DIR__).'/var/logs';
34
    }
35
36
    public function registerContainerConfiguration(LoaderInterface $loader)
37
    {
38
        $loader->load($this->getRootDir().'/config/config.yml');
39
    }
40
}
41