AppKernel   A
last analyzed

Complexity

Total Complexity 5

Size/Duplication

Total Lines 34
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 6

Importance

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

5 Methods

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