TestKernel   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 33
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 4

Importance

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

3 Methods

Rating   Name   Duplication   Size   Complexity  
A setConfigurationFilename() 0 4 1
A registerBundles() 0 7 1
A registerContainerConfiguration() 0 4 1
1
<?php
2
3
namespace Knp\Bundle\SnappyBundle\Tests;
4
5
use Symfony\Component\Config\Loader\LoaderInterface;
6
use Symfony\Component\HttpKernel\Kernel;
7
8
class TestKernel extends Kernel
9
{
10
    private $configurationFilename;
11
12
    /**
13
     * Defines the configuration filename.
14
     *
15
     * @param string $filename
16
     */
17
    public function setConfigurationFilename($filename)
18
    {
19
        $this->configurationFilename = $filename;
20
    }
21
22
    /**
23
     * {@inheritdoc}
24
     */
25
    public function registerBundles()
26
    {
27
        return [
28
            new \Symfony\Bundle\FrameworkBundle\FrameworkBundle(),
29
            new \Knp\Bundle\SnappyBundle\KnpSnappyBundle(),
30
        ];
31
    }
32
33
    /**
34
     * {@inheritdoc}
35
     */
36
    public function registerContainerConfiguration(LoaderInterface $loader)
37
    {
38
        $loader->load($this->configurationFilename);
39
    }
40
}
41