Completed
Push — master ( da6964...f96373 )
by Thomas
17s
created

ErrorHandler   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
eloc 6
dl 0
loc 15
ccs 0
cts 5
cp 0
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A handleError() 0 10 1
1
<?php
2
3
declare(strict_types=1);
4
5
/*
6
 * This file is part of the ekino Drupal Debug project.
7
 *
8
 * (c) ekino
9
 *
10
 * For the full copyright and license information, please view the LICENSE
11
 * file that was distributed with this source code.
12
 */
13
14
namespace Ekino\Drupal\Debug\Action\ThrowErrorsAsExceptions;
15
16
use Symfony\Component\Debug\ErrorHandler as BaseErrorHandler;
17
18
// TODO : useless if https://github.com/symfony/symfony/pull/29869 is merged
19
class ErrorHandler extends BaseErrorHandler
20
{
21
    /**
22
     * {@inheritdoc}
23
     */
24
    public function handleError($type, $message, $file, $line): bool
25
    {
26
        $result = parent::handleError($type, $message, $file, $line);
27
28
        \set_error_handler(array(
29
            $this,
30
            __FUNCTION__,
31
        ));
32
33
        return $result;
34
    }
35
}
36