Conditions | 3 |
Paths | 3 |
Total Lines | 10 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 12 |
Changes | 0 |
1 | <?php |
||
16 | public static function handleRequestException(RequestException $exception): void |
||
17 | { |
||
18 | switch ($exception->getCode()) { |
||
19 | case 400: |
||
20 | throw new BadRequestException(); |
||
21 | case 404: |
||
22 | throw new NotFoundException(); |
||
23 | } |
||
24 | |||
25 | throw new eCurringException($exception->getMessage(), $exception->getCode(), $exception); |
||
26 | } |
||
28 |