Total Complexity | 1 |
Total Lines | 29 |
Duplicated Lines | 0 % |
Changes | 6 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
14 | class RequestMethodMapping |
||
15 | { |
||
16 | const REQUEST_METHOD_GET = 'get'; |
||
17 | const REQUEST_METHOD_POST = 'post'; |
||
18 | |||
19 | const REQUEST_QUERY_GET = 'query'; |
||
20 | const REQUEST_QUERY_POST = 'request'; |
||
21 | |||
22 | const CONTENT_TYPE_GET = 'query'; |
||
23 | const CONTENT_TYPE_POST = 'form_params'; |
||
24 | |||
25 | public static $methodsMapping = [ |
||
26 | self::REQUEST_METHOD_GET => self::REQUEST_QUERY_GET, |
||
27 | self::REQUEST_METHOD_POST => self::REQUEST_QUERY_POST, |
||
28 | ]; |
||
29 | |||
30 | public static $contentTypes = [ |
||
31 | self::REQUEST_METHOD_GET => self::CONTENT_TYPE_GET, |
||
32 | self::REQUEST_METHOD_POST => self::CONTENT_TYPE_POST, |
||
33 | ]; |
||
34 | |||
35 | /** |
||
36 | * @param string $method |
||
37 | * |
||
38 | * @return bool |
||
39 | */ |
||
40 | public static function isValidMethod($method) |
||
45 |