| Total Complexity | 3 |
| Total Lines | 30 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 19 | class SupportedRequestMethods |
||
| 20 | { |
||
| 21 | |||
| 22 | /** |
||
| 23 | * Method returns a list of supported request methods |
||
| 24 | * |
||
| 25 | * @return string[] list of supported request methods |
||
| 26 | */ |
||
| 27 | public static function getListOfSupportedRequestMethods(): array |
||
| 28 | { |
||
| 29 | return [ |
||
| 30 | 'GET', |
||
| 31 | 'POST', |
||
| 32 | 'PUT', |
||
| 33 | 'DELETE', |
||
| 34 | 'OPTION', |
||
| 35 | 'PATCH' |
||
| 36 | ]; |
||
| 37 | } |
||
| 38 | |||
| 39 | /** |
||
| 40 | * Method validates request method |
||
| 41 | * |
||
| 42 | * @param string $requestMethod |
||
| 43 | * HTTP request method |
||
| 44 | */ |
||
| 45 | public static function validateRequestMethod(string $requestMethod): void |
||
| 49 | } |
||
| 50 | } |
||
| 52 |