Test Failed
Pull Request — master (#12)
by
unknown
06:46
created

BrowserInfo::setScreenHeight()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
1
<?php
2
3
namespace Cardinity\Method\Payment;
4
5
// use Cardinity\Method\ResultObject;
6
7
8
class BrowserInfo //extends ResultObject
9
{
10
    /** @type STRING */
11
    private $acceptHeader;
12
13
    /** @type STRING */
14
    private $browserLanguage;
15
16
    /** @type INT */
17
    private $screenWidth;
18
    
19
    /** @type INT */
20
    private $screenHeight;
21
    
22
    /** @type STRING */
23
    private $challengeWindowSize;
24
25
    /** @type STRING */
26
    private $userAgent;
27
    
28
    /** @type INT */
29
    private $colorDepth;
30
 
31
    /** @type INT */
32
    private $timeZone;
33
    
34
    /** @type STRING */
35
    private $ipAddress;
36
37
    /** @type BOOL */
38
    private $javaEnabled;
39
    
40
    /** @type BOOL */
41
    private $javascriptEnabled;
42
43
    /**
44
     * @return STRING header
45
     */
46
    public function getAcceptHeader()
47
    {
48
        return $this->acceptHeader;
49
    }
50
51
52
    /**
53
     * @param STRING accept header
54
     * @return VOID
55
     */
56
    public function setAcceptHeader(string $acceptHeader) : void
57
    {
58
        $this->acceptHeader = $acceptHeader;
59
    }
60
61
62
    /**
63
     * @return STRING of browser language
64
     */
65
    public function getBrowserLanguage()
66
    {
67
        return $this->browserLanguage;
68
    }
69
70
71
    /**
72
     * @param STRING of browser language
73
     * @return VOID
74
     */
75
    public function setBrowserLanguage(string $browserLanguage) : void
76
    {
77
        $this->browserLanguage = $browserLanguage;
78
    }
79
80
81
    /**
82
     * @return INT of browser screen width
83
     */
84
    public function getScreenWidth()
85
    {
86
        return $this->screenWidth;
87
    }
88
89
90
    /**
91
     * @param INT browser screen width
92
     * @return VOID
93
     */
94
    public function setScreenWidth(int $screenWidth) : void
95
    {
96
        $this->screenWidth = $screenWidth;
97
    }
98
99
100
    /**
101
     * @return INT browser screen height
102
     */
103
    public function getScreenHeight()
104
    {
105
        return $this->screenHeight;
106
    }
107
108
109
    /**
110
     * @param INT browser screen height
111
     * @return VOID
112
     */
113
    public function setScreenHeight(int $screenHeight) : void
114
    {
115
        $this->screenHeight = $screenHeight;
116
    }
117
118
119
    /**
120
     * @return STRING of window size
121
     */
122
    public function getChallengeWindowSize()
123
    {
124
        return $this->challengeWindowSize;
125
    }
126
127
128
    /**
129
     * @param STRING of window size
130
     * @return VOID
131
     */
132
    public function setChallengeWindowSize($challengeWindowSize) : void
133
    {
134
        $this->challengeWindowSize = $challengeWindowSize;
135
    }
136
137
138
    /**
139
     * @return STRING of user agent
140
     */
141
    public function getUserAgent()
142
    {
143
        return $this->userAgent;
144
    }
145
146
147
    /**
148
     * @param STRING of user agent
149
     * @return VOID
150
     */
151
    public function setUserAgent(string $userAgent) : void
152
    {
153
        $this->userAgent = $userAgent;
154
    }
155
156
157
    /**
158
     * @return INT of color depth
159
     */
160
    public function getColorDepth()
161
    {
162
        return $this->colorDepth;
163
    }
164
165
166
    /**
167
     * @param INT of color depth
168
     * @return VOID
169
     */
170
    public function setColorDepth(int $colorDepth) : void
171
    {
172
        $this->colorDepth = $colorDepth;
173
    }
174
175
176
    /**
177
     * @return INT of time zone
178
     */
179
    public function getTimeZone()
180
    {
181
        return $this->timeZone;
182
    }
183
184
185
    /**
186
     * @param INT of time zone
187
     * @return VOID
188
     */
189
    public function setTimeZone(int $timeZone) : void
190
    {
191
        $this->timeZone = $timeZone;
192
    }
193
194
195
    /**
196
     * @return STRING ip adress
197
     */
198
    public function getIpAddress()
199
    {
200
        return $this->ipAddress;
201
    }
202
    
203
204
    /**
205
     * @param STRING ip adress
206
     * @return VOID
207
     */
208
    public function setIpAddress(string $ipAddress) : void
209
    {
210
        $this->ipAddress = $ipAddress;
211
    }
212
213
214
    /**
215
     * @return BOOL is java enabled?
216
     */
217
    public function getJavaEnabled()
218
    {
219
        return $this->javaEnabled == true;
0 ignored issues
show
Coding Style Best Practice introduced by
It seems like you are loosely comparing two booleans. Considering using the strict comparison === instead.

When comparing two booleans, it is generally considered safer to use the strict comparison operator.

Loading history...
220
    }
221
222
223
    /**
224
     * @param BOOL is java enabled?
225
     * @return VOID
226
     */
227
    public function setJavaEnabled(bool $javaEnabled) : void
228
    {
229
        $this->javaEnabled = $javaEnabled;
230
    }
231
232
233
    /**
234
     * @return BOOL is javascript enabled?
235
     */
236
    public function getJavascriptEnabled()
237
    {
238
        return $this->javascriptEnabled == true;
0 ignored issues
show
Coding Style Best Practice introduced by
It seems like you are loosely comparing two booleans. Considering using the strict comparison === instead.

When comparing two booleans, it is generally considered safer to use the strict comparison operator.

Loading history...
239
    }
240
    
241
242
    /**
243
     * @param BOOL is javascript enabled?
244
     * @return VOID
245
     */
246
    public function setJavascriptEnabled(bool $javascriptEnabled) : void
247
    {
248
        $this->javascriptEnabled == $javascriptEnabled;
249
    }
250
}