TestKernel   A
last analyzed

Complexity

Total Complexity 5

Size/Duplication

Total Lines 31
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
dl 0
loc 31
rs 10
c 0
b 0
f 0
wmc 5

5 Methods

Rating   Name   Duplication   Size   Complexity  
A getLogDir() 0 3 1
A getCacheDir() 0 3 1
A __construct() 0 5 1
A registerContainerConfiguration() 0 3 1
A registerBundles() 0 6 1
1
<?php
2
3
namespace Devmachine\Bundle\ServicesInjectorBundle\Tests\Functional;
4
5
use Devmachine\Bundle\ServicesInjectorBundle\DevmachineServicesInjectorBundle;
6
use Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle;
7
use Symfony\Bundle\FrameworkBundle\FrameworkBundle;
8
use Symfony\Component\Config\Loader\LoaderInterface;
9
use Symfony\Component\HttpKernel\Kernel;
10
11
class TestKernel extends Kernel
12
{
13
    public function __construct()
14
    {
15
        parent::__construct('test', true);
16
17
        $this->tempDir = __DIR__.'/temp';
0 ignored issues
show
Bug Best Practice introduced by
The property tempDir does not exist. Although not strictly required by PHP, it is generally a best practice to declare properties explicitly.
Loading history...
18
    }
19
20
    public function registerBundles()
21
    {
22
        return [
23
            new FrameworkBundle(),
24
            new SensioFrameworkExtraBundle(),
25
            new DevmachineServicesInjectorBundle(),
26
        ];
27
    }
28
29
    public function getCacheDir()
30
    {
31
        return $this->tempDir.'/cache';
32
    }
33
34
    public function getLogDir()
35
    {
36
        return $this->tempDir.'/logs';
37
    }
38
39
    public function registerContainerConfiguration(LoaderInterface $loader)
40
    {
41
        $loader->load(__DIR__.'/config.yml');
42
    }
43
}
44