Test Failed
Pull Request — master (#12)
by
unknown
05:03
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
6
class BrowserInfo
7
{
8
    /** @type STRING */
9
    private $acceptHeader;
10
11
    /** @type STRING */
12
    private $browserLanguage;
13
14
    /** @type INT */
15
    private $screenWidth;
16
    
17
    /** @type INT */
18
    private $screenHeight;
19
    
20
    /** @type STRING */
21
    private $challengeWindowSize;
22
23
    /** @type STRING */
24
    private $userAgent;
25
    
26
    /** @type INT */
27
    private $colorDepth;
28
 
29
    /** @type INT */
30
    private $timeZone;
31
    
32
    /** @type STRING */
33
    private $ipAddress;
34
35
    /** @type BOOL */
36
    private $javaEnabled;
37
    
38
    /** @type BOOL */
39
    private $javascriptEnabled;
40
41
    /**
42
     * @return STRING header
43
     */
44
    public function getAcceptHeader()
45
    {
46
        return $this->acceptHeader;
47
    }
48
49
50
    /**
51
     * @param STRING accept header
52
     * @return VOID
53
     */
54
    public function setAcceptHeader(string $acceptHeader) : void
55
    {
56
        $this->acceptHeader = $acceptHeader;
57
    }
58
59
60
    /**
61
     * @return STRING of browser language
62
     */
63
    public function getBrowserLanguage()
64
    {
65
        return $this->browserLanguage;
66
    }
67
68
69
    /**
70
     * @param STRING of browser language
71
     * @return VOID
72
     */
73
    public function setBrowserLanguage(string $browserLanguage) : void
74
    {
75
        $this->browserLanguage = $browserLanguage;
76
    }
77
78
79
    /**
80
     * @return INT of browser screen width
81
     */
82
    public function getScreenWidth()
83
    {
84
        return $this->screenWidth;
85
    }
86
87
88
    /**
89
     * @param INT browser screen width
90
     * @return VOID
91
     */
92
    public function setScreenWidth(int $screenWidth) : void
93
    {
94
        $this->screenWidth = $screenWidth;
95
    }
96
97
98
    /**
99
     * @return INT browser screen height
100
     */
101
    public function getScreenHeight()
102
    {
103
        return $this->screenHeight;
104
    }
105
106
107
    /**
108
     * @param INT browser screen height
109
     * @return VOID
110
     */
111
    public function setScreenHeight(int $screenHeight) : void
112
    {
113
        $this->screenHeight = $screenHeight;
114
    }
115
116
117
    /**
118
     * @return STRING of window size
119
     */
120
    public function getChallengeWindowSize()
121
    {
122
        return $this->challengeWindowSize;
123
    }
124
125
126
    /**
127
     * @param STRING of window size
128
     * @return VOID
129
     */
130
    public function setChallengeWindowSize($challengeWindowSize) : void
131
    {
132
        $this->challengeWindowSize = $challengeWindowSize;
133
    }
134
135
136
    /**
137
     * @return STRING of user agent
138
     */
139
    public function getUserAgent()
140
    {
141
        return $this->userAgent;
142
    }
143
144
145
    /**
146
     * @param STRING of user agent
147
     * @return VOID
148
     */
149
    public function setUserAgent(string $userAgent) : void
150
    {
151
        $this->userAgent = $userAgent;
152
    }
153
154
155
    /**
156
     * @return INT of color depth
157
     */
158
    public function getColorDepth()
159
    {
160
        return $this->colorDepth;
161
    }
162
163
164
    /**
165
     * @param INT of color depth
166
     * @return VOID
167
     */
168
    public function setColorDepth(int $colorDepth) : void
169
    {
170
        $this->colorDepth = $colorDepth;
171
    }
172
173
174
    /**
175
     * @return INT of time zone
176
     */
177
    public function getTimeZone()
178
    {
179
        return $this->timeZone;
180
    }
181
182
183
    /**
184
     * @param INT of time zone
185
     * @return VOID
186
     */
187
    public function setTimeZone(int $timeZone) : void
188
    {
189
        $this->timeZone = $timeZone;
190
    }
191
192
193
    /**
194
     * @return STRING ip adress
195
     */
196
    public function getIpAddress()
197
    {
198
        return $this->ipAddress;
199
    }
200
    
201
202
    /**
203
     * @param STRING ip adress
204
     * @return VOID
205
     */
206
    public function setIpAddress(string $ipAddress) : void
207
    {
208
        $this->ipAddress = $ipAddress;
209
    }
210
211
212
    /**
213
     * @return BOOL is java enabled?
214
     */
215
    public function getJavaEnabled()
216
    {
217
        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...
218
    }
219
220
221
    /**
222
     * @param BOOL is java enabled?
223
     * @return VOID
224
     */
225
    public function setJavaEnabled(bool $javaEnabled) : void
226
    {
227
        $this->javaEnabled = $javaEnabled;
228
    }
229
230
231
    /**
232
     * @return BOOL is javascript enabled?
233
     */
234
    public function getJavascriptEnabled()
235
    {
236
        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...
237
    }
238
    
239
240
    /**
241
     * @param BOOL is javascript enabled?
242
     * @return VOID
243
     */
244
    public function setJavascriptEnabled(bool $javascriptEnabled) : void
245
    {
246
        $this->javascriptEnabled == $javascriptEnabled;
247
    }
248
}