MicroKernel::configureContainer()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
c 0
b 0
f 0
rs 10
cc 1
eloc 2
nc 1
nop 2
1
<?php
2
3
use Symfony\Bundle\FrameworkBundle\Kernel\MicroKernelTrait;
4
use Symfony\Component\Config\Loader\LoaderInterface;
5
use Symfony\Component\DependencyInjection\ContainerBuilder;
6
use Symfony\Component\HttpKernel\Kernel;
7
use Symfony\Component\Routing\RouteCollectionBuilder;
8
9
/**
10
 * @author Koen Vinken <[email protected]>
11
 */
12
class MicroKernel extends Kernel
13
{
14
    use MicroKernelTrait;
15
16
    /*
17
     * {@inheritDoc}
18
     */
19
    public function registerBundles()
20
    {
21
        $bundles = array(
22
            new Symfony\Bundle\FrameworkBundle\FrameworkBundle(),
23
            new Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle(),
24
            new Symfony\Bundle\TwigBundle\TwigBundle(),
25
            new AppBundle\AppBundle(),
26
        );
27
28
        if (in_array($this->getEnvironment(), array('dev', 'test'), true)) {
29
            $bundles[] = new Symfony\Bundle\WebProfilerBundle\WebProfilerBundle();
30
            $bundles[] = new Symfony\Bundle\DebugBundle\DebugBundle();
31
        }
32
33
        return $bundles;
34
    }
35
36
    /*
37
     * {@inheritDoc}
38
     */
39
    protected function configureRoutes(RouteCollectionBuilder $routes)
40
    {
41
        if (in_array($this->getEnvironment(), array('dev', 'test'), true)) {
42
            $routes->import('@WebProfilerBundle/Resources/config/routing/wdt.xml', '/_wdt');
43
            $routes->import('@WebProfilerBundle/Resources/config/routing/profiler.xml', '/_profiler');
44
        }
45
46
        $routes->import('@AppBundle/Controller', '/', 'annotation');
47
    }
48
49
    /*
50
     * {@inheritDoc}
51
     */
52
    protected function configureContainer(ContainerBuilder $c, LoaderInterface $loader)
0 ignored issues
show
Unused Code introduced by
The parameter $c is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
53
    {
54
        $loader->load(__DIR__ . '/config/config_' . $this->getEnvironment() . '.yml');
55
    }
56
}
57