Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
CRAP | |
100.00% |
1 / 1 |
HttpMethod | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |
100.00% |
1 / 1 |
gets | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 |
1 | <?php |
2 | |
3 | declare(strict_types=1); |
4 | |
5 | namespace PeServer\Core\Http; |
6 | |
7 | use PeServer\Core\Collection\Arr; |
8 | use PeServer\Core\Text; |
9 | |
10 | /** |
11 | * HTTPメソッド。 |
12 | */ |
13 | enum HttpMethod: string |
14 | { |
15 | case Get = 'GET'; |
16 | case Head = 'HEAD'; |
17 | case Post = 'POST'; |
18 | case Put = 'PUT'; |
19 | case Delete = 'DELETE'; |
20 | case Connect = 'CONNECT'; |
21 | case Options = 'OPTIONS'; |
22 | case Trace = 'TRACE'; |
23 | case Patch = 'PATCH'; |
24 | |
25 | /** |
26 | * 通常のGET的なやつ。 |
27 | * |
28 | * @return self[] Get/Head。 |
29 | */ |
30 | public static function gets(): array |
31 | { |
32 | return [self::Get, self::Head]; |
33 | } |
34 | } |