Conditions | 1 |
Paths | 1 |
Total Lines | 10 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 1 |
Changes | 0 |
1 | <?php |
||
33 | 12 | public function __construct(RequestException $exception) |
|
34 | { |
||
35 | 12 | $decode = json_decode($exception->getResponse()->getBody()->getContents()); |
|
36 | |||
37 | 12 | $this->status = $decode->status; |
|
38 | 12 | $this->request = $decode->request; |
|
39 | 12 | $this->time = (new DateTime())->setTimestamp($decode->time); |
|
40 | |||
41 | 12 | parent::__construct($decode->error_message, $exception->getCode(), $exception->getPrevious()); |
|
42 | 12 | } |
|
43 | |||
68 |