| Conditions | 2 |
| Paths | 2 |
| Total Lines | 9 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 2 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 12 | 2 | public function __construct(Response $response) |
|
| 13 | { |
||
| 14 | 2 | $this->response = $response; |
|
| 15 | 2 | $error = $this->response->json('error', ''); |
|
| 16 | 2 | if (!$error) { |
|
| 17 | 2 | $error = $this->response->json('message', ''); |
|
| 18 | } |
||
| 19 | |||
| 20 | 2 | parent::__construct("Api returned error: \"{$error}\". Meta: {$this->getResponseApiVersion()}|{$this->getResponseServerVersion()}|{$this->getResponseUUID()}", $response->status()); |
|
| 21 | } |
||
| 56 |