ExceptionController   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 1
dl 0
loc 12
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A setDebug() 0 4 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\Controller;
10
11
use Symfony\Bundle\TwigBundle\Controller\ExceptionController as BaseController;
12
13
/**
14
 * This ExceptionController is a plain Symfony ExceptionController apart from the possibility to change it's debug
15
 * property after construction.
16
 *
17
 * Having set debug = true, as you probably have during development, throwing and not catching an exception leads to
18
 * Symfony's default "Exception detected" ghost page. For the TestController, setting debug to false is an easy way to
19
 * circumvent this behaviour, resulting in your fine crafted exeption pages being rendered.
20
 */
21
class ExceptionController extends BaseController
0 ignored issues
show
Deprecated Code introduced by
The class Symfony\Bundle\TwigBundl...ler\ExceptionController has been deprecated with message: since Symfony 4.4, use Symfony\Component\HttpKernel\Controller\ErrorController instead.

This class, trait or interface has been deprecated. The supplier of the file has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the type will be removed from the class and what other constant to use instead.

Loading history...
22
{
23
    /**
24
     * Set the internal debug property.
25
     *
26
     * @param bool $bool
27
     */
28
    public function setDebug($bool)
29
    {
30
        $this->debug = $bool;
31
    }
32
}
33