FatalErrorHandler::run()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 11
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 7
CRAP Score 2

Importance

Changes 0
Metric Value
eloc 6
dl 0
loc 11
ccs 7
cts 7
cp 1
rs 10
c 0
b 0
f 0
cc 2
nc 2
nop 0
crap 2
1
<?php
2
/**
3
 * Class for fatal errors handling
4
 *
5
 * @file      FatalErrorHandler.php
6
 *
7
 * PHP version 8.0+
8
 *
9
 * @author    Yancharuk Alexander <alex at itvault dot info>
10
 * @copyright © 2012-2021 Alexander Yancharuk
11
 * @date      2015-08-10 06:02
12
 * @license   The BSD 3-Clause License
13
 *            <https://tldrlegal.com/license/bsd-3-clause-license-(revised)>
14
 */
15
16
namespace Veles\ErrorHandler;
17
18
/**
19
 * Class FatalErrorHandler
20
 * @author  Yancharuk Alexander <alex at itvault dot info>
21
 */
22
class FatalErrorHandler extends BaseErrorHandler
23
{
24 1
	public function run()
25
	{
26 1
		if (null === ($this->vars = error_get_last())) {
27 1
			return;
28
		}
29
30 1
		$this->vars['time']    = $this->getTime();
31 1
		$this->vars['stack']   = [];
32 1
		$this->vars['defined'] = [];
33
34 1
		$this->notify();
35
	}
36
}
37