| Conditions | 7 |
| Paths | 4 |
| Total Lines | 12 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 56 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 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 | } |
||
| 40 |