| Conditions | 4 |
| Paths | 3 |
| Total Lines | 18 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 33 | public function __construct( |
||
| 34 | string $message = "", |
||
| 35 | int $code = 0, |
||
| 36 | Throwable $previous = null, |
||
| 37 | array $data = null |
||
| 38 | ) { |
||
| 39 | if ($previous !== null && $data === null) { |
||
| 40 | $this->data = [ |
||
| 41 | 'exception' => get_class($previous), |
||
| 42 | 'code' => $previous->getCode(), |
||
| 43 | 'file' => $previous->getFile(), |
||
| 44 | 'line' => $previous->getLine(), |
||
| 45 | ]; |
||
| 46 | } elseif ($data !== null) { |
||
| 47 | $this->data = $data; |
||
| 48 | } |
||
| 49 | |||
| 50 | parent::__construct($message, $code, $previous); |
||
| 51 | } |
||
| 61 |