FatalThrowableError::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 6
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 4
nc 1
nop 3
1
<?php
2
3
namespace yiicod\jobqueue\base;
4
5
use Exception;
6
7
/**
8
 * DaemonExceptionHandler
9
 *
10
 * @author Virchenko Maksim <[email protected]>
11
 */
12
class FatalThrowableError extends Exception
13
{
14
    /**
15
     * FatalThrowableError constructor.
16
     *
17
     * @param string $e
18
     * @param int $code
19
     * @param Exception|null $previous
20
     */
21
    public function __construct($e, $code = 0, Exception $previous = null)
22
    {
23
        $this->message = $e->getMessage();
0 ignored issues
show
Bug introduced by
The method getMessage cannot be called on $e (of type string).

Methods can only be called on objects. This check looks for methods being called on variables that have been inferred to never be objects.

Loading history...
24
        $this->file = $e->getFile();
0 ignored issues
show
Bug introduced by
The method getFile cannot be called on $e (of type string).

Methods can only be called on objects. This check looks for methods being called on variables that have been inferred to never be objects.

Loading history...
25
        $this->line = $e->getLine();
0 ignored issues
show
Bug introduced by
The method getLine cannot be called on $e (of type string).

Methods can only be called on objects. This check looks for methods being called on variables that have been inferred to never be objects.

Loading history...
26
    }
27
}
28