Completed
Push — master ( 589f5d...2e0cd6 )
by Pavel
07:02
created

CrudsTestKernel   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 39
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 6

Importance

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

5 Methods

Rating   Name   Duplication   Size   Complexity  
A registerBundles() 0 9 1
A getCacheDir() 0 4 1
A getLogDir() 0 4 1
A registerContainerConfiguration() 0 4 1
A getClassName() 0 6 1
1
<?php
2
3
namespace ScayTrase\Api\Cruds\Tests\Fixtures\Common;
4
5
use Doctrine\Bundle\DoctrineBundle\DoctrineBundle;
6
use ScayTrase\Api\Cruds\CrudsBundle;
7
use Symfony\Bundle\FrameworkBundle\FrameworkBundle;
8
use Symfony\Component\Config\Loader\LoaderInterface;
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
    /** {@inheritdoc} */
35
    public function registerContainerConfiguration(LoaderInterface $loader)
36
    {
37
        return $loader->load(__DIR__ . '/config.yml');
38
    }
39
40
    /**
41
     * @return array
42
     */
43
    private function getClassName()
44
    {
45
        $path = explode('\\', static::class);
46
47
        return array_pop($path);
48
    }
49
}
50