Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
CRAP
100.00% covered (success)
100.00%
1 / 1
HttpRequestExists
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
100.00% covered (success)
100.00%
1 / 1
 __construct
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
1<?php
2
3declare(strict_types=1);
4
5namespace PeServer\Core\Http;
6
7/**
8 * HTTPリクエスト存在確認。
9 */
10readonly class HttpRequestExists
11{
12    #region define
13
14    /** 使わん */
15    public const KIND_NONE = 0;
16    /** URL */
17    public const KIND_URL = 1;
18    /** GET */
19    public const KIND_GET = 2;
20    /** POST */
21    public const KIND_POST = 3;
22    /** FILE */
23    public const KIND_FILE = 4;
24
25    #endregion
26
27    /**
28     * 生成。
29     *
30     * @param string $name パラメータ名。
31     * @param boolean $exists 存在するか。
32     * @param self::KIND_* $kind 種別。
33     */
34    public function __construct(
35        public string $name,
36        public bool $exists,
37        public int $kind
38    ) {
39    }
40}