Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
100.00% |
6 / 6 |
|
100.00% |
2 / 2 |
CRAP | |
100.00% |
1 / 1 |
| ClientRequestException | |
100.00% |
6 / 6 |
|
100.00% |
2 / 2 |
2 | |
100.00% |
1 / 1 |
| __construct | |
100.00% |
5 / 5 |
|
100.00% |
1 / 1 |
1 | |||
| getStatusCode | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| 1 | <?php |
| 2 | namespace Apie\Core\Exceptions; |
| 3 | |
| 4 | use Throwable; |
| 5 | |
| 6 | /** |
| 7 | * Something went wrong with the client request, but it was not clear how it could be mapped. |
| 8 | */ |
| 9 | final class ClientRequestException extends ApieException implements HttpStatusCodeException |
| 10 | { |
| 11 | public function __construct(Throwable $previous) |
| 12 | { |
| 13 | parent::__construct( |
| 14 | 'Unknown client request error: ' . $previous->getMessage(), |
| 15 | 0, |
| 16 | $previous |
| 17 | ); |
| 18 | } |
| 19 | |
| 20 | public function getStatusCode(): int |
| 21 | { |
| 22 | return 400; |
| 23 | } |
| 24 | } |