Completed
Pull Request — master (#171)
by
unknown
02:25 queued 25s
created

AbstractConfiguration   A

Complexity

Total Complexity 11

Size/Duplication

Total Lines 167
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 23
dl 0
loc 167
rs 10
c 0
b 0
f 0
wmc 11

11 Methods

Rating   Name   Duplication   Size   Complexity  
A getJiraLogFile() 0 3 1
A getOAuthAccessToken() 0 3 1
A isCurlOptVerbose() 0 3 1
A isCookieAuthorizationEnabled() 0 3 1
A getJiraLogLevel() 0 3 1
A getJiraUser() 0 3 1
A isCurlOptSslVerifyHost() 0 3 1
A getJiraPassword() 0 3 1
A getJiraHost() 0 3 1
A getCurlOptUserAgent() 0 3 1
A isCurlOptSslVerifyPeer() 0 3 1
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
     * @return string
89
     */
90
    public function getJiraHost()
91
    {
92
        return $this->jiraHost;
93
    }
94
95
    /**
96
     * @return string
97
     */
98
    public function getJiraUser()
99
    {
100
        return $this->jiraUser;
101
    }
102
103
    /**
104
     * @return string
105
     */
106
    public function getJiraPassword()
107
    {
108
        return $this->jiraPassword;
109
    }
110
111
    /**
112
     * @return string
113
     */
114
    public function getJiraLogFile()
115
    {
116
        return $this->jiraLogFile;
117
    }
118
119
    /**
120
     * @return string
121
     */
122
    public function getJiraLogLevel()
123
    {
124
        return $this->jiraLogLevel;
125
    }
126
127
    /**
128
     * @return bool
129
     */
130
    public function isCurlOptSslVerifyHost()
131
    {
132
        return $this->curlOptSslVerifyHost;
133
    }
134
135
    /**
136
     * @return bool
137
     */
138
    public function isCurlOptSslVerifyPeer()
139
    {
140
        return $this->curlOptSslVerifyPeer;
141
    }
142
143
    /**
144
     * @return bool
145
     */
146
    public function isCurlOptVerbose()
147
    {
148
        return $this->curlOptVerbose;
149
    }
150
151
    /**
152
     * Get curl option CURLOPT_USERAGENT.
153
     *
154
     * @return string
155
     */
156
    public function getCurlOptUserAgent()
157
    {
158
        return $this->curlOptUserAgent;
159
    }
160
161
    /**
162
     * @return string
163
     */
164
    public function getOAuthAccessToken()
165
    {
166
        return $this->oauthAccessToken;
167
    }
168
169
    /**
170
     * @return string
171
     */
172
    public function isCookieAuthorizationEnabled()
173
    {
174
        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...
175
    }
176
}
177