Passed
Push — master ( 37d938...bd9077 )
by KwangSeob
02:16
created

AbstractConfiguration::getJiraLogFile()   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
     * Path to log file.
33
     *
34
     * @var string
35
     */
36
    protected $jiraLogFile;
37
38
    /**
39
     * Log level (DEBUG, INFO, ERROR, WARNING).
40
     *
41
     * @var string
42
     */
43
    protected $jiraLogLevel;
44
45
    /**
46
     * Curl options CURLOPT_SSL_VERIFYHOST.
47
     *
48
     * @var bool
49
     */
50
    protected $curlOptSslVerifyHost;
51
52
    /**
53
     * Curl options CURLOPT_SSL_VERIFYPEER.
54
     *
55
     * @var bool
56
     */
57
    protected $curlOptSslVerifyPeer;
58
59
    /**
60
     * Curl option CURLOPT_USERAGENT.
61
     *
62
     * @var string
63
     */
64
    protected $curlOptUserAgent;
65
66
    /**
67
     * Curl options CURLOPT_VERBOSE.
68
     *
69
     * @var bool
70
     */
71
    protected $curlOptVerbose;
72
73
    /**
74
     * HTTP header 'Authorization: Bearer {token}' for OAuth.
75
     *
76
     * @var string
77
     */
78
    protected $oauthAccessToken;
79
80
    /**
81
     * enable cookie authorization.
82
     *
83
     * @var bool
84
     */
85
    protected $cookieAuthEnabled;
86
87
    /**
88
     * HTTP cookie file name.
89
     *
90
     * @var string
91
     */
92
    protected $cookieFile;
93
94
    /**
95
     * Proxy server.
96
     *
97
     * @var string
98
     */
99
    protected $proxyServer;
100
101
    /**
102
     * Proxy port.
103
     *
104
     * @var string
105
     */
106
    protected $proxyPort;
107
108
    /**
109
     * Proxy user.
110
     *
111
     * @var string
112
     */
113
    protected $proxyUser;
114
115
    /**
116
     * Proxy password.
117
     *
118
     * @var string
119
     */
120
    protected $proxyPassword;
121
122
    /**
123
     * @return string
124
     */
125
    public function getJiraHost()
126
    {
127
        return $this->jiraHost;
128
    }
129
130
    /**
131
     * @return string
132
     */
133
    public function getJiraUser()
134
    {
135
        return $this->jiraUser;
136
    }
137
138
    /**
139
     * @return string
140
     */
141
    public function getJiraPassword()
142
    {
143
        return $this->jiraPassword;
144
    }
145
146
    /**
147
     * @return string
148
     */
149
    public function getJiraLogFile()
150
    {
151
        return $this->jiraLogFile;
152
    }
153
154
    /**
155
     * @return string
156
     */
157
    public function getJiraLogLevel()
158
    {
159
        return $this->jiraLogLevel;
160
    }
161
162
    /**
163
     * @return bool
164
     */
165
    public function isCurlOptSslVerifyHost()
166
    {
167
        return $this->curlOptSslVerifyHost;
168
    }
169
170
    /**
171
     * @return bool
172
     */
173
    public function isCurlOptSslVerifyPeer()
174
    {
175
        return $this->curlOptSslVerifyPeer;
176
    }
177
178
    /**
179
     * @return bool
180
     */
181
    public function isCurlOptVerbose()
182
    {
183
        return $this->curlOptVerbose;
184
    }
185
186
    /**
187
     * Get curl option CURLOPT_USERAGENT.
188
     *
189
     * @return string
190
     */
191
    public function getCurlOptUserAgent()
192
    {
193
        return $this->curlOptUserAgent;
194
    }
195
196
    /**
197
     * @return string
198
     */
199
    public function getOAuthAccessToken()
200
    {
201
        return $this->oauthAccessToken;
202
    }
203
204
    /**
205
     * @return string
206
     */
207
    public function isCookieAuthorizationEnabled()
208
    {
209
        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...
210
    }
211
212
    /**
213
     * get default User-Agent String.
214
     *
215
     * @return string
216
     */
217
    public function getDefaultUserAgentString()
218
    {
219
        $curlVersion = curl_version();
220
221
        return sprintf('curl/%s (%s)', $curlVersion['version'], $curlVersion['host']);
222
    }
223
224
    /**
225
     * @return string
226
     */
227
    public function getCookieFile()
228
    {
229
        return $this->cookieFile;
230
    }
231
232
    /**
233
     * @return string
234
     */
235
    public function getProxyServer()
236
    {
237
        return $this->proxyServer;
238
    }
239
240
    /**
241
     * @return string
242
     */
243
    public function getProxyPort()
244
    {
245
        return $this->proxyPort;
246
    }
247
248
    /**
249
     * @return string
250
     */
251
    public function getProxyUser()
252
    {
253
        return $this->proxyUser;
254
    }
255
256
    /**
257
     * @return string
258
     */
259
    public function getProxyPassword()
260
    {
261
        return $this->proxyPassword;
262
    }
263
}
264