ExceptionHandler   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 2
eloc 4
c 0
b 0
f 0
dl 0
loc 18
ccs 0
cts 5
cp 0
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __destruct() 0 3 1
A __construct() 0 5 1
1
<?php
2
3
namespace PhpOffice\PhpSpreadsheet\Calculation;
4
5
class ExceptionHandler
6
{
7
    /**
8
     * Register errorhandler.
9
     */
10
    public function __construct()
11
    {
12
        /** @var callable $callable */
13
        $callable = [Exception::class, 'errorHandlerCallback'];
14
        set_error_handler($callable, E_ALL);
15
    }
16
17
    /**
18
     * Unregister errorhandler.
19
     */
20
    public function __destruct()
21
    {
22
        restore_error_handler();
23
    }
24
}
25