Total Complexity | 9 |
Total Lines | 27 |
Duplicated Lines | 0 % |
Coverage | 0% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
11 | abstract class AbstractProvider |
||
12 | { |
||
13 | public function getName(): string |
||
16 | } |
||
17 | |||
18 | protected function httpStatusCodeValidation(int $httpStatusCode): void |
||
19 | { |
||
20 | if ($httpStatusCode > 299 && $httpStatusCode < 399) { |
||
21 | throw new RedirectionServerResponseException('HTTP status code=' . $httpStatusCode); |
||
22 | } |
||
23 | |||
24 | if ($httpStatusCode > 399 && $httpStatusCode < 499) { |
||
25 | throw new InvalidRequestException('HTTP status code=' . $httpStatusCode); |
||
26 | } |
||
27 | |||
28 | if ($httpStatusCode > 499 && $httpStatusCode < 599) { |
||
29 | throw new InvalidServerResponseException('HTTP status code=' . $httpStatusCode); |
||
30 | } |
||
31 | } |
||
32 | |||
33 | protected function isJson(string $string): bool |
||
38 | } |
||
39 | } |
||
40 |