Passed
Pull Request — master (#332)
by
unknown
02:39
created

AbstractConfiguration::getJiraLogEnabled()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace JiraRestApi\Configuration;
4
5
/**
6
 * Class AbstractConfiguration.
7
 */
8
abstract class AbstractConfiguration implements ConfigurationInterface
9
{
10
    /**
11
     * Jira host.
12
     *
13
     * @var string
14
     */
15
    protected $jiraHost;
16
17
    /**
18
     * Jira login.
19
     *
20
     * @var string
21
     */
22
    protected $jiraUser;
23
24
    /**
25
     * Jira password.
26
     *
27
     * @var string
28
     */
29
    protected $jiraPassword;
30
31
    /**
32
     * Enabled write to log.
33
     *
34
     * @var bool
35
     */
36
    protected $jiraLogEnabled;
37
38
    /**
39
     * Path to log file.
40
     *
41
     * @var string
42
     */
43
    protected $jiraLogFile;
44
45
    /**
46
     * Log level (DEBUG, INFO, ERROR, WARNING).
47
     *
48
     * @var string
49
     */
50
    protected $jiraLogLevel;
51
52
    /**
53
     * Curl options CURLOPT_SSL_VERIFYHOST.
54
     *
55
     * @var bool
56
     */
57
    protected $curlOptSslVerifyHost;
58
59
    /**
60
     * Curl options CURLOPT_SSL_VERIFYPEER.
61
     *
62
     * @var bool
63
     */
64
    protected $curlOptSslVerifyPeer;
65
66
    /**
67
     * Curl option CURLOPT_USERAGENT.
68
     *
69
     * @var string
70
     */
71
    protected $curlOptUserAgent;
72
73
    /**
74
     * Curl options CURLOPT_VERBOSE.
75
     *
76
     * @var bool
77
     */
78
    protected $curlOptVerbose;
79
80
    /**
81
     * HTTP header 'Authorization: Bearer {token}' for OAuth.
82
     *
83
     * @var string
84
     */
85
    protected $oauthAccessToken;
86
87
    /**
88
     * enable cookie authorization.
89
     *
90
     * @var bool
91
     */
92
    protected $cookieAuthEnabled;
93
94
    /**
95
     * HTTP cookie file name.
96
     *
97
     * @var string
98
     */
99
    protected $cookieFile;
100
101
    /**
102
     * Proxy server.
103
     *
104
     * @var string
105
     */
106
    protected $proxyServer;
107
108
    /**
109
     * Proxy port.
110
     *
111
     * @var string
112
     */
113
    protected $proxyPort;
114
115
    /**
116
     * Proxy user.
117
     *
118
     * @var string
119
     */
120
    protected $proxyUser;
121
122
    /**
123
     * Proxy password.
124
     *
125
     * @var string
126
     */
127
    protected $proxyPassword;
128
129
    /**
130
     * Use Jira Cloud REST API v3.
131
     *
132
     * @var bool
133
     */
134
    protected $useV3RestApi;
135
136
    /**
137
     * @return string
138
     */
139
    public function getJiraHost()
140
    {
141
        return $this->jiraHost;
142
    }
143
144
    /**
145
     * @return string
146
     */
147
    public function getJiraUser()
148
    {
149
        return $this->jiraUser;
150
    }
151
152
    /**
153
     * @return string
154
     */
155
    public function getJiraPassword()
156
    {
157
        return $this->jiraPassword;
158
    }
159
160
    /**
161
     * @return bool
162
     */
163
    public function getJiraLogEnabled()
164
    {
165
        return $this->jiraLogEnabled;
166
    }
167
168
    /**
169
     * @return string
170
     */
171
    public function getJiraLogFile()
172
    {
173
        return $this->jiraLogFile;
174
    }
175
176
    /**
177
     * @return string
178
     */
179
    public function getJiraLogLevel()
180
    {
181
        return $this->jiraLogLevel;
182
    }
183
184
    /**
185
     * @return bool
186
     */
187
    public function isCurlOptSslVerifyHost()
188
    {
189
        return $this->curlOptSslVerifyHost;
190
    }
191
192
    /**
193
     * @return bool
194
     */
195
    public function isCurlOptSslVerifyPeer()
196
    {
197
        return $this->curlOptSslVerifyPeer;
198
    }
199
200
    /**
201
     * @return string
202
     */
203
    public function isCurlOptSslCert()
204
    {
205
        return $this->curlOptSslCert;
206
    }
207
208
    /**
209
     * @return string
210
     */
211
    public function isCurlOptSslCertPassword()
212
    {
213
        return $this->curlOptSslCertPassword;
214
    }
215
216
    /**
217
     * @return string
218
     */
219
    public function isCurlOptSslKey()
220
    {
221
        return $this->curlOptSslKey;
222
    }
223
224
    /**
225
     * @return string
226
     */
227
    public function isCurlOptSslKeyPassword()
228
    {
229
        return $this->curlOptSslKeyPassword;
230
    }
231
232
    /**
233
     * @return bool
234
     */
235
    public function isCurlOptVerbose()
236
    {
237
        return $this->curlOptVerbose;
238
    }
239
240
    /**
241
     * Get curl option CURLOPT_USERAGENT.
242
     *
243
     * @return string
244
     */
245
    public function getCurlOptUserAgent()
246
    {
247
        return $this->curlOptUserAgent;
248
    }
249
250
    /**
251
     * @return string
252
     */
253
    public function getOAuthAccessToken()
254
    {
255
        return $this->oauthAccessToken;
256
    }
257
258
    /**
259
     * @return string
260
     */
261
    public function isCookieAuthorizationEnabled()
262
    {
263
        return $this->cookieAuthEnabled;
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this->cookieAuthEnabled returns the type boolean which is incompatible with the documented return type string.
Loading history...
264
    }
265
266
    /**
267
     * get default User-Agent String.
268
     *
269
     * @return string
270
     */
271
    public function getDefaultUserAgentString()
272
    {
273
        $curlVersion = curl_version();
274
275
        return sprintf('curl/%s (%s)', $curlVersion['version'], $curlVersion['host']);
276
    }
277
278
    /**
279
     * @return string
280
     */
281
    public function getCookieFile()
282
    {
283
        return $this->cookieFile;
284
    }
285
286
    /**
287
     * @return string
288
     */
289
    public function getProxyServer()
290
    {
291
        return $this->proxyServer;
292
    }
293
294
    /**
295
     * @return string
296
     */
297
    public function getProxyPort()
298
    {
299
        return $this->proxyPort;
300
    }
301
302
    /**
303
     * @return string
304
     */
305
    public function getProxyUser()
306
    {
307
        return $this->proxyUser;
308
    }
309
310
    /**
311
     * @return string
312
     */
313
    public function getProxyPassword()
314
    {
315
        return $this->proxyPassword;
316
    }
317
318
    /**
319
     * @return bool
320
     */
321
    public function getUseV3RestApi()
322
    {
323
        return $this->useV3RestApi;
324
    }
325
}