Total Complexity | 1 |
Total Lines | 27 |
Duplicated Lines | 0 % |
Coverage | 0% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
21 | class MethodsEnum |
||
22 | { |
||
23 | const GET = 'GET'; |
||
24 | const POST = 'POST'; |
||
25 | const PUT = 'PUT'; |
||
26 | const DELETE = 'DELETE'; |
||
27 | const FETCH = 'FETCH'; |
||
28 | const HEAD = 'HEAD'; |
||
29 | const OPTIONS = 'OPTIONS'; |
||
30 | const PATCH = 'PATCH'; |
||
31 | const LINK = 'LINK'; |
||
32 | |||
33 | private const VALID_METHODS = [ |
||
34 | self::GET, |
||
35 | self::POST, |
||
36 | self::PUT, |
||
37 | self::DELETE, |
||
38 | self::PATCH, |
||
39 | self::FETCH, |
||
40 | self::OPTIONS, |
||
41 | self::HEAD, |
||
42 | self::LINK, |
||
43 | ]; |
||
44 | |||
45 | public static function isValid(string $method): bool |
||
50 |