Exception   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A errorHandlerCallback() 0 7 1
1
<?php
2
3
namespace PhpOffice\PhpSpreadsheet\Calculation;
4
5
use PhpOffice\PhpSpreadsheet\Exception as PhpSpreadsheetException;
6
7
class Exception extends PhpSpreadsheetException
8
{
9
    public const CALCULATION_ENGINE_PUSH_TO_STACK = 1;
10
11
    /**
12
     * Error handler callback.
13
     */
14
    public static function errorHandlerCallback(int $code, string $string, string $file, int $line): void
15
    {
16
        $e = new self($string, $code);
17
        $e->line = $line;
18
        $e->file = $file;
19
20
        throw $e;
21
    }
22
}
23