AppKernel::getEnvironment()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
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