Failed Conditions
Pull Request — feature/init (#3)
by Yo
01:46
created

HttpServerDoc::getEndpoint()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
ccs 0
cts 3
cp 0
crap 2
rs 10
c 0
b 0
f 0
1
<?php
2
namespace Yoanm\JsonRpcServerDoc\Model;
3
4
/**
5
 * Class HttpServerDoc
6
 */
7
class HttpServerDoc extends ServerDoc
8
{
9
    /** @var string|null */
10
    private $endpoint = null;
11
    /** @var string|null */
12
    private $host = null;
13
    /** @var string|null */
14
    private $basePath = null;
15
    /** @var string[] */
16
    private $schemeList = [];
17
18
    /**
19
     * @param string $endpoint
20
     *
21
     * @return HttpServerDoc
22
     */
23
    public function setEndpoint(string $endpoint) : HttpServerDoc
24
    {
25
        $this->endpoint = $endpoint;
26
27
        return $this;
28
    }
29
30
    /**
31
     * @param string $host
32
     *
33
     * @return HttpServerDoc
34
     */
35
    public function setHost(string $host) : HttpServerDoc
36
    {
37
        $this->host = $host;
38
39
        return $this;
40
    }
41
42
    /**
43
     * @param string $basePath
44
     *
45
     * @return HttpServerDoc
46
     */
47
    public function setBasePath(string $basePath) : HttpServerDoc
48
    {
49
        $this->basePath = $basePath;
50
51
        return $this;
52
    }
53
54
    /**
55
     * @param string[] $schemeList
56
     *
57
     * @return HttpServerDoc
58
     */
59
    public function setSchemeList(array $schemeList) : HttpServerDoc
60
    {
61
        $this->schemeList = $schemeList;
62
63
        return $this;
64
    }
65
66
    /**
67
     * @return null|string
68
     */
69
    public function getEndpoint()
70
    {
71
        return $this->endpoint;
72
    }
73
74
    /**
75
     * @return null|string
76
     */
77
    public function getHost()
78
    {
79
        return $this->host;
80
    }
81
82
    /**
83
     * @return null|string
84
     */
85
    public function getBasePath()
86
    {
87
        return $this->basePath;
88
    }
89
90
    /**
91
     * @return string[]
92
     */
93
    public function getSchemeList() : array
94
    {
95
        return $this->schemeList;
96
    }
97
}
98