Completed
Push — master ( 58bdf2...4883e1 )
by Pavel
03:39
created

Kernel   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 34
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 4

Test Coverage

Coverage 100%

Importance

Changes 2
Bugs 1 Features 0
Metric Value
wmc 5
c 2
b 1
f 0
lcom 0
cbo 4
dl 0
loc 34
ccs 16
cts 16
cp 1
rs 10

5 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
A getCacheDir() 0 4 1
A getLogDir() 0 4 1
A registerBundles() 0 7 1
A registerContainerConfiguration() 0 4 1
1
<?php
2
3
namespace Bankiru\Api\Rpc\Tests\Fixtures;
4
5
use Bankiru\Api\Rpc\RpcBundle;
6
use Symfony\Bundle\FrameworkBundle\FrameworkBundle;
7
use Symfony\Component\Config\Loader\LoaderInterface;
8
use Symfony\Component\HttpKernel\Kernel as BaseKernel;
9
10
class Kernel extends BaseKernel
11
{
12 10
    public function __construct($environment, $debug)
13
    {
14 10
        @unlink($this->getCacheDir());
15 10
        @unlink($this->getLogDir());
16 10
        parent::__construct($environment, $debug);
17 10
    }
18
19 10
    public function getCacheDir()
20
    {
21 10
        return __DIR__ . '/../../../../../../build/cache/';
22
    }
23
24 10
    public function getLogDir()
25
    {
26 10
        return __DIR__ . '/../../../../../../build/log/';
27
    }
28
29
    /** {@inheritdoc} */
30 10
    public function registerBundles()
31
    {
32
        return [
33 10
            new FrameworkBundle(),
34 10
            new RpcBundle(),
35 10
        ];
36
    }
37
38
    /** {@inheritdoc} */
39 1
    public function registerContainerConfiguration(LoaderInterface $loader)
40
    {
41 1
        $loader->load(__DIR__ . '/config/test.yml');
42 1
    }
43
}
44