Completed
Push — master ( 8ce185...772880 )
by Pavel
04:21
created

CrudsTestKernel   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 33
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 5

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 4
c 1
b 0
f 0
lcom 0
cbo 5
dl 0
loc 33
rs 10

4 Methods

Rating   Name   Duplication   Size   Complexity  
A registerBundles() 0 9 1
A getCacheDir() 0 4 1
A getLogDir() 0 4 1
A getClassName() 0 6 1
1
<?php
2
3
namespace ScayTrase\Api\Cruds\Tests;
4
5
use Doctrine\Bundle\DoctrineBundle\DoctrineBundle;
6
use ScayTrase\Api\Cruds\CrudsBundle;
7
use ScayTrase\Api\Cruds\Tests\Fixtures\Common\MyBundle;
8
use Symfony\Bundle\FrameworkBundle\FrameworkBundle;
9
use Symfony\Component\HttpKernel\Kernel;
10
11
abstract class CrudsTestKernel extends Kernel
12
{
13
    /** {@inheritdoc} */
14
    public function registerBundles()
15
    {
16
        return [
17
            new CrudsBundle(),
18
            new DoctrineBundle(),
19
            new MyBundle(),
20
            new FrameworkBundle(),
21
        ];
22
    }
23
24
    public function getCacheDir()
25
    {
26
        return __DIR__ . '/../build/' . $this->getClassName() . '/cache';
27
    }
28
29
    public function getLogDir()
30
    {
31
        return __DIR__ . '/../build/' . $this->getClassName() . '/logs';
32
    }
33
34
    /**
35
     * @return array
36
     */
37
    private function getClassName()
38
    {
39
        $path = explode('\\', static::class);
40
41
        return array_pop($path);
42
    }
43
}
44