Conditions | 2 |
Paths | 2 |
Total Lines | 7 |
Code Lines | 3 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 6 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
28 | public static function smspohRespondedWithAnError(ClientException $exception): self |
||
29 | { |
||
30 | if (! $exception->hasResponse()) { |
||
31 | return new static('Smspoh responded with an error but no response body found'); |
||
32 | } |
||
33 | |||
34 | return new static("Smspoh responded with an error '{$exception->getCode()} : {$exception->getMessage()}'", $exception->getCode(), $exception); |
||
35 | } |
||
49 |