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