AppKernel   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 8

Importance

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

3 Methods

Rating   Name   Duplication   Size   Complexity  
A registerBundles() 0 16 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
            $bundles[] = new Symfony\Bundle\SwiftmailerBundle\SwiftmailerBundle();
20
        }
21
22
        return $bundles;
23
    }
24
25
    public function registerContainerConfiguration(LoaderInterface $loader)
26
    {
27
        $loader->load(__DIR__ . '/config_test.yml');
28
    }
29
30
    public function getLogDir()
31
    {
32
        return dirname(__DIR__) . '/logs';
33
    }
34
}