AppKernel::getRootDir()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 3
rs 10
1
<?php
2
3
namespace NW\JsonRequestBundle\Tests\Fixtures\app;
4
5
use Symfony\Component\HttpKernel\Kernel;
6
use Symfony\Component\Filesystem\Filesystem;
7
use Symfony\Component\Config\Loader\LoaderInterface;
8
9
class AppKernel extends Kernel
10
{
11
    public function __construct($environment, $debug)
12
    {
13
        parent::__construct($environment, $debug);
14
15
        (new Filesystem())->remove($this->getCacheDir());
16
    }
17
18
    public function registerBundles()
19
    {
20
        return [
21
            new \Symfony\Bundle\FrameworkBundle\FrameworkBundle(),
22
            new \NW\JsonRequestBundle\NWJsonRequestBundle(),
23
        ];
24
    }
25
26
    public function getRootDir()
27
    {
28
        return __DIR__;
29
    }
30
31
    public function getCacheDir()
32
    {
33
        return '/tmp/symfony-cache';
34
    }
35
36
    public function getLogDir()
37
    {
38
        return '/tmp/symfony-cache';
39
    }
40
41
    public function registerContainerConfiguration(LoaderInterface $loader)
42
    {
43
        $loader->load($this->getRootDir() . '/config/config_test.yml');
44
    }
45
}
46