WebfactoryExceptionsBundle::build()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 8
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
1
<?php
2
/*
3
 * (c) webfactory GmbH <[email protected]>
4
 *
5
 * For the full copyright and license information, please view the LICENSE
6
 * file that was distributed with this source code.
7
 */
8
9
namespace Webfactory\Bundle\ExceptionsBundle;
10
11
use Symfony\Component\HttpKernel\Bundle\Bundle;
12
use Symfony\Component\DependencyInjection\ContainerBuilder;
13
14
/**
15
 * Symfony bundle class that overwrites the Twig exception controller class with this bundle's one for easy testing of
16
 * your custom exception pages.
17
 */
18
class WebfactoryExceptionsBundle extends Bundle
19
{
20
    /**
21
     * @see \Symfony\Component\HttpKernel\Bundle\Bundle::build()
22
     */
23
    public function build(ContainerBuilder $container)
24
    {
25
        parent::build($container);
26
        $container->setParameter(
27
            'twig.controller.exception.class',
28
            'Webfactory\Bundle\ExceptionsBundle\Controller\ExceptionController'
29
        );
30
    }
31
}
32