Completed
Pull Request — master (#114)
by Harrison
07:56
created

TestKernel   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 7

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 7
dl 0
loc 29
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A registerBundles() 0 15 2
1
<?php declare(strict_types=1);
2
3
namespace KleijnWeb\SwaggerBundle\Tests\Functional\PetStore\app;
4
5
use Symfony\Component\Config\Loader\LoaderInterface;
6
use Symfony\Component\HttpKernel\Kernel;
7
8
class TestKernel extends Kernel
9
{
10
    /**
11
     * {@inheritdoc}
12
     */
13
    public function registerBundles()
14
    {
15
        $bundles = [
16
            new \Symfony\Bundle\FrameworkBundle\FrameworkBundle(),
17
            new \Symfony\Bundle\MonologBundle\MonologBundle(),
18
            new \KleijnWeb\SwaggerBundle\KleijnWebSwaggerBundle(),
19
            new \KleijnWeb\SwaggerBundle\Tests\Functional\PetStore\PetStoreBundle(),
20
        ];
21
22
        if (0 === strpos($this->getEnvironment(), 'secure')) {
23
            $bundles[] = new \Symfony\Bundle\SecurityBundle\SecurityBundle();
24
        }
25
26
        return $bundles;
27
    }
28
29
    /**
30
     * {@inheritdoc}
31
     */
32
    public function registerContainerConfiguration(LoaderInterface $loader)
33
    {
34
        $loader->load(__DIR__ . '/config_' . $this->getEnvironment() . '.yml');
35
    }
36
}
37