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

HttpServerDoc   A

Complexity

Total Complexity 8

Size/Duplication

Total Lines 89
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
dl 0
loc 89
ccs 0
cts 35
cp 0
rs 10
c 0
b 0
f 0
wmc 8

8 Methods

Rating   Name   Duplication   Size   Complexity  
A setEndpoint() 0 5 1
A getBasePath() 0 3 1
A setBasePath() 0 5 1
A getEndpoint() 0 3 1
A getHost() 0 3 1
A getSchemeList() 0 3 1
A setSchemeList() 0 5 1
A setHost() 0 5 1
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