Conditions | 1 |
Paths | 1 |
Total Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
39 | public static function rocketChatRespondedWithAnError(ClientException $exception): self |
||
40 | { |
||
41 | $message = $exception->getResponse()->getBody(); |
||
42 | $code = $exception->getResponse()->getStatusCode(); |
||
43 | |||
44 | return new static("RocketChat responded with an error `{$code} - {$message}`"); |
||
45 | } |
||
46 | |||
58 |