Conditions | 2 |
Paths | 2 |
Total Lines | 14 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 4 |
CRAP Score | 2.686 |
Changes | 0 |
1 | <?php |
||
17 | 2 | public function __construct(string $message = '', int $code = 0, Throwable $previous = null) |
|
18 | { |
||
19 | 2 | parent::__construct($message, $code, $previous); |
|
20 | |||
21 | 2 | if ($previous !== null) { |
|
22 | $this->file = $previous->getFile(); |
||
23 | $this->line = $previous->getLine(); |
||
24 | |||
25 | $this->setError(new UnsuccessfulRequest([ |
||
26 | 'description' => $previous->getMessage(), |
||
27 | 'error_code' => $previous->getCode(), |
||
28 | ])); |
||
29 | } |
||
30 | 2 | } |
|
31 | |||
46 |