Exception   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 9
c 1
b 0
f 0
dl 0
loc 22
ccs 8
cts 8
cp 1
rs 10
wmc 2

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 12 2
1
<?php
2
/**
3
 * Ease Exeption
4
 *
5
 * @author    Vitex <[email protected]>
6
 * @copyright 2009-2018 [email protected] (G)
7
 * 
8
 * PHP 7
9
 */
10
11
namespace Ease;
12
13
/**
14
 * Exeption use EaseLogger to keep message
15
 *
16
 * @author vitex
17
 */
18
class Exception extends \Exception
19
{
20
21
    /**
22
     * Ease Framework Exception
23
     * 
24
     * @param string          $message  of exeption
25
     * @param int             $code     error code
26 1
     * @param \Ease\Exception $previous
27
     */
28 1
    public function __construct($message, $code = 0, Exception $previous = null)
29 1
    {
30 1
        $trace = $this->getTrace();
31 1
        \Ease\Shared::logger()->addStatusObject(
32 1
            new Logger\Message(
33 1
                $message,
34 1
                'error',
35
                $trace[0]['class'].'::'.$trace[0]['function'].
0 ignored issues
show
Bug introduced by
$trace[0]['class'] . '::...ne']) : new Ease\Atom() of type string is incompatible with the type Ease\Atom expected by parameter $caller of Ease\Logger\Message::__construct(). ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-type  annotation

35
                /** @scrutinizer ignore-type */ $trace[0]['class'].'::'.$trace[0]['function'].
Loading history...
36
                ( isset($trace[0]['line']) ?  (new Molecule())->setObjectName($trace[0]['line']) : new Atom() )
37
            )
38
        );
39
        parent::__construct($message, $code, $previous);
40
    }
41
}
42