GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Pull Request — master (#2)
by VEBER
02:20
created

Api::getStripRequestPath()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
nc 1
cc 1
eloc 2
nop 0
1
<?php
2
3
/*
4
 * This file is part of the KongAdminApi package.
5
 *
6
 * (c) Unikorp <https://github.com/unikorp>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Unikorp\KongAdminApi\Document;
13
14
use Unikorp\KongAdminApi\AbstractDocument;
15
16
/**
17
 * api
18
 *
19
 * @author VEBER Arnaud <https://github.com/VEBERArnaud>
20
 */
21
class Api extends AbstractDocument
22
{
23
    /**
24
     * name
25
     * @var string $name
26
     */
27
    protected $name = null;
28
29
    /**
30
     * request host
31
     * @var string $requestHost
32
     */
33
    protected $requestHost = null;
34
35
    /**
36
     * request path
37
     * @var string $requestPath
38
     */
39
    protected $requestPath = null;
40
41
    /**
42
     * strip request path
43
     * @var boolean $stripRequestPath
44
     */
45
    protected $stripRequestPath = false;
46
47
    /**
48
     * preserve host
49
     * @var boolean $preserveHost
50
     */
51
    protected $preserveHost = false;
52
53
    /**
54
     * upstream url
55
     * @var string $upstreamUrl
56
     */
57
    protected $upstreamUrl = null;
58
59
    /**
60
     * set name
61
     *
62
     * @param string $name
63
     *
64
     * @return this
65
     */
66
    public function setName($name)
67
    {
68
        $this->name = $name;
69
70
        return $this;
71
    }
72
73
    /**
74
     * get name
75
     *
76
     * @return string
77
     */
78
    public function getName()
79
    {
80
        return $this->name;
81
    }
82
83
    /**
84
     * set request host
85
     *
86
     * @param string $requestHost
87
     *
88
     * @return this
89
     */
90
    public function setRequestHost($requestHost)
91
    {
92
        $this->requestHost = $requestHost;
93
94
        return $this;
95
    }
96
97
    /**
98
     * get request host
99
     *
100
     * @return string
101
     */
102
    public function getRequestHost()
103
    {
104
        return $this->requestHost;
105
    }
106
107
    /**
108
     * set request path
109
     *
110
     * @param string $requestPath
111
     *
112
     * @return this
113
     */
114
    public function setRequestPath($requestPath)
115
    {
116
        $this->requestPath = $requestPath;
117
118
        return $this;
119
    }
120
121
    /**
122
     * get request path
123
     *
124
     * @return string
125
     */
126
    public function getRequestPath()
127
    {
128
        return $this->requestPath;
129
    }
130
131
    /**
132
     * set strip request path
133
     *
134
     * @param boolean $stripRequestPath
135
     *
136
     * @return this
137
     */
138
    public function setStripRequestPath($stripRequestPath)
139
    {
140
        $this->stripRequestPath = $stripRequestPath;
141
142
        return $this;
143
    }
144
145
    /**
146
     * get strip request path
147
     *
148
     * @return boolean
149
     */
150
    public function getStripRequestPath()
151
    {
152
        return $this->stripRequestPath;
153
    }
154
155
    /**
156
     * set preserve host
157
     *
158
     * @param boolean $preserveHost
159
     *
160
     * @return this
161
     */
162
    public function setPreserveHost($preserveHost)
163
    {
164
        $this->preserveHost = $preserveHost;
165
166
        return $this;
167
    }
168
169
    /**
170
     * get preserve host
171
     *
172
     * @return boolean
173
     */
174
    public function getPreserveHost()
175
    {
176
        return $this->preserveHost;
177
    }
178
179
    /**
180
     * set upstream url
181
     *
182
     * @param string $upstreamUrl
183
     *
184
     * @return this
185
     */
186
    public function setUpstreamUrl($upstreamUrl)
187
    {
188
        $this->upstreamUrl = $upstreamUrl;
189
    }
190
191
    /**
192
     * get upstream url
193
     *
194
     * @return string
195
     */
196
    public function getUpstreamUrl()
197
    {
198
        return $this->upstreamUrl;
199
    }
200
201
    /**
202
     * get fields
203
     *
204
     * @return array
205
     */
206
    protected function getFields()
207
    {
208
        return [
209
            'name',
210
            'requestHost',
211
            'requestPath',
212
            'stripRequestPath',
213
            'preserveHost',
214
            'upstreamUrl',
215
        ];
216
    }
217
}
218