Completed
Push — master ( 705569...50fbec )
by dan
02:16
created

AppKernel   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 4

Importance

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

3 Methods

Rating   Name   Duplication   Size   Complexity  
A registerBundles() 0 15 2
A registerContainerConfiguration() 0 4 1
A getLogDir() 0 4 1
1
<?php
2
3
use Symfony\Component\HttpKernel\Kernel;
4
use Symfony\Component\Config\Loader\LoaderInterface;
5
6
class AppKernel extends Kernel
7
{
8
    public function registerBundles()
9
    {
10
        $bundles = [];
11
12
        if (in_array($this->getEnvironment(), ['test'])) {
13
            $bundles[] = new Symfony\Bundle\FrameworkBundle\FrameworkBundle();
14
            $bundles[] = new Symfony\Bundle\TwigBundle\TwigBundle();
15
            $bundles[] = new Symfony\Bundle\MonologBundle\MonologBundle();
16
            $bundles[] = new Doctrine\Bundle\DoctrineBundle\DoctrineBundle();
17
            $bundles[] = new Sensio\Bundle\GeneratorBundle\SensioGeneratorBundle();
18
            $bundles[] = new IrishDan\NotificationBundle\NotificationBundle();
19
        }
20
21
        return $bundles;
22
    }
23
24
    public function registerContainerConfiguration(LoaderInterface $loader)
25
    {
26
        $loader->load(__DIR__ . '/config_test.yml');
27
    }
28
29
    public function getLogDir()
30
    {
31
        return dirname(__DIR__) . '/logs';
32
    }
33
}