Completed
Push — master ( deb1d5...3324ab )
by Pablo
04:13
created

AppKernel   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 33
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

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

4 Methods

Rating   Name   Duplication   Size   Complexity  
A registerBundles() 0 6 1
A getCacheDir() 0 4 1
A getLogDir() 0 4 1
A registerContainerConfiguration() 0 4 1
1
<?php
2
3
use Symfony\Component\HttpKernel\Kernel;
4
5
/**
6
 * Class AppKernel
7
 *
8
 * @@codingStandardsIgnoreFile
9
 */
10
class AppKernel extends Kernel
11
{
12
    const SERVICES_FILE = 'services.yml';
13
    const CONFIG_PATH = '/config/';
14
15
    public function registerBundles()
16
    {
17
        return [
18
            new \Bruli\EventBusBundle\EventBusBundle(),
19
        ];
20
    }
21
22
    public function getCacheDir()
23
    {
24
        return dirname(__DIR__).'/var/cache/'.$this->getEnvironment();
25
    }
26
27
    public function getLogDir()
28
    {
29
        return dirname(__DIR__).'/var/logs';
30
    }
31
32
33
    /**
34
     * Loads the container configuration.
35
     *
36
     * @param \Symfony\Component\Config\Loader\LoaderInterface $loader A LoaderInterface instance
37
     */
38
    public function registerContainerConfiguration(\Symfony\Component\Config\Loader\LoaderInterface $loader)
39
    {
40
        $loader->load(__DIR__.self::CONFIG_PATH.self::SERVICES_FILE);
41
    }
42
}
43