AppKernel   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 43
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 6

Importance

Changes 2
Bugs 0 Features 1
Metric Value
wmc 4
c 2
b 0
f 1
lcom 0
cbo 6
dl 0
loc 43
rs 10

4 Methods

Rating   Name   Duplication   Size   Complexity  
A registerBundles() 0 9 1
A registerContainerConfiguration() 0 4 1
A getEnvironment() 0 4 1
A isDebug() 0 4 1
1
<?php
2
3
/*
4
 * This file is part of the Visithor package.
5
 *
6
 * For the full copyright and license information, please view the LICENSE
7
 * file that was distributed with this source code.
8
 *
9
 * Feel free to edit as you please, and have fun.
10
 *
11
 * @author Marc Morera <[email protected]>
12
 */
13
14
use Symfony\Component\Config\Loader\LoaderInterface;
15
use Symfony\Component\HttpKernel\Kernel;
16
17
/**
18
 * AppKernel for testing
19
 */
20
class AppKernel extends Kernel
21
{
22
    /**
23
     * Registers all needed bundles
24
     */
25
    public function registerBundles()
26
    {
27
        return [
28
            new Symfony\Bundle\FrameworkBundle\FrameworkBundle(),
29
            new Symfony\Bundle\SecurityBundle\SecurityBundle(),
30
            new Visithor\Bundle\VisithorBundle(),
31
            new Visithor\Bundle\Tests\FakeBundle\FakeBundle(),
32
        ];
33
    }
34
35
    /**
36
     * Setup configuration file.
37
     */
38
    public function registerContainerConfiguration(LoaderInterface $loader)
39
    {
40
        $loader->load(dirname(__FILE__) . '/config.yml');
41
    }
42
43
    /**
44
     * {@inheritdoc}
45
     *
46
     * @api
47
     */
48
    public function getEnvironment()
49
    {
50
        return 'test';
51
    }
52
53
    /**
54
     * {@inheritdoc}
55
     *
56
     * @api
57
     */
58
    public function isDebug()
59
    {
60
        return false;
61
    }
62
}
63