AppKernel   A
last analyzed

Complexity

Total Complexity 5

Size/Duplication

Total Lines 32
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 4

Importance

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

5 Methods

Rating   Name   Duplication   Size   Complexity  
A registerBundles() 0 9 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\ObjectRender\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 \Psi\Bundle\ObjectRender\PsiObjectRenderBundle(),
15
        ];
16
17
        return $bundles;
18
    }
19
20
    public function getRootDir()
21
    {
22
        return __DIR__;
23
    }
24
25
    public function getCacheDir()
26
    {
27
        return dirname(__DIR__).'/var/cache/'.$this->getEnvironment();
28
    }
29
30
    public function getLogDir()
31
    {
32
        return dirname(__DIR__).'/var/logs';
33
    }
34
35
    public function registerContainerConfiguration(LoaderInterface $loader)
36
    {
37
        $loader->load($this->getRootDir().'/config/config.yml');
38
    }
39
}
40