Passed
Push — develop ( c92be2...6a5227 )
by nguereza
12:37
created
src/Detector/OsDetector.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -100,8 +100,8 @@  discard block
 block discarded – undo
100 100
                 // Windows based
101 101
                 '/microsoft\s(windows)\s(vista|xp)/i'                                 // Windows (iTunes)
102 102
             ], [self::NAME, self::VERSION], [
103
-                '/(windows)\snt\s6\.2;\s(arm)/i',                                     // Windows RT
104
-                '/(windows\sphone(?:\sos)*)[\s\/]?([\d\.\s\w]*)/i',                   // Windows Phone
103
+                '/(windows)\snt\s6\.2;\s(arm)/i', // Windows RT
104
+                '/(windows\sphone(?:\sos)*)[\s\/]?([\d\.\s\w]*)/i', // Windows Phone
105 105
                 '/(windows\smobile|windows)[\s\/]?([ntce\d\.\s]+\w)/i'
106 106
             ], [self::NAME, [self::VERSION, '__str', 'windows.versions']], [
107 107
                 '/(win(?=3|9|n)|win\s9x\s)([nt\d\.]+)/i'
@@ -110,8 +110,8 @@  discard block
 block discarded – undo
110 110
                 // Mobile/Embedded OS
111 111
                 '/\((bb)(10);/i'                                                      // BlackBerry 10
112 112
             ], [[self::NAME, 'BlackBerry'], self::VERSION], [
113
-                '/(blackberry)\w*\/?([\w\.]*)/i',                                     // Blackberry
114
-                '/(tizen)[\/\s]([\w\.]+)/i',                                          // Tizen
113
+                '/(blackberry)\w*\/?([\w\.]*)/i', // Blackberry
114
+                '/(tizen)[\/\s]([\w\.]+)/i', // Tizen
115 115
                 '/(android|webos|palm\sos|qnx|bada|rim\stablet\sos|meego|sailfish|contiki)[\/\s-]?([\w\.]*)/i'
116 116
                 // Android/WebOS/Palm/QNX/Bada/RIM/MeeGo/Contiki/Sailfish OS
117 117
             ], [self::NAME, self::VERSION], [
@@ -123,15 +123,15 @@  discard block
 block discarded – undo
123 123
             ], [[self::NAME, 'Firefox OS'], self::VERSION], [
124 124
 
125 125
                 // Console
126
-                '/(nintendo|playstation)\s([wids34portablevu]+)/i',                   // Nintendo/Playstation
126
+                '/(nintendo|playstation)\s([wids34portablevu]+)/i', // Nintendo/Playstation
127 127
 
128 128
                 // GNU/Linux based
129
-                '/(mint)[\/\s\(]?(\w*)/i',                                            // Mint
130
-                '/(mageia|vectorlinux)[;\s]/i',                                       // Mageia/VectorLinux
129
+                '/(mint)[\/\s\(]?(\w*)/i', // Mint
130
+                '/(mageia|vectorlinux)[;\s]/i', // Mageia/VectorLinux
131 131
                 '/(joli|[kxln]?ubuntu|debian|suse|opensuse|gentoo|(?=\s)arch|slackware|fedora|mandriva|centos|pclinuxos|redhat|zenwalk|linpus)[\/\s-]?(?!chrom)([\w\.-]*)/i',
132 132
                 // Joli/Ubuntu/Debian/SUSE/Gentoo/Arch/Slackware
133 133
                 // Fedora/Mandriva/CentOS/PCLinuxOS/RedHat/Zenwalk/Linpus
134
-                '/(hurd|linux)\s?([\w\.]*)/i',                                        // Hurd/Linux
134
+                '/(hurd|linux)\s?([\w\.]*)/i', // Hurd/Linux
135 135
                 '/(gnu)\s?([\w\.]*)/i'                                                // GNU
136 136
             ], [self::NAME, self::VERSION], [
137 137
 
@@ -158,8 +158,8 @@  discard block
 block discarded – undo
158 158
             ], [[self::NAME, 'Mac OS'], [self::VERSION, '/_/', '.']], [
159 159
 
160 160
                 // Other
161
-                '/((?:open)?solaris)[\/\s-]?([\w\.]*)/i',                             // Solaris
162
-                '/(aix)\s((\d)(?=\.|\)|\s)[\w\.])*/i',                                // AIX
161
+                '/((?:open)?solaris)[\/\s-]?([\w\.]*)/i', // Solaris
162
+                '/(aix)\s((\d)(?=\.|\)|\s)[\w\.])*/i', // AIX
163 163
                 '/(plan\s9|minix|beos|os\/2|amigaos|morphos|risc\sos|openvms|fuchsia)/i',
164 164
                 // Plan9/Minix/BeOS/OS2/AmigaOS/MorphOS/RISCOS/OpenVMS/Fuchsia
165 165
                 '/(unix)\s?([\w\.]*)/i'                                               // UNIX
Please login to merge, or discard this patch.
src/Detector/EngineDetector.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -87,10 +87,10 @@
 block discarded – undo
87 87
                 '/webkit\/537\.36.+chrome\/(?!27)/i'                                  // Blink
88 88
             ], [[self::NAME, 'Blink']], [
89 89
 
90
-                '/(presto)\/([\w\.]+)/i',                                             // Presto
90
+                '/(presto)\/([\w\.]+)/i', // Presto
91 91
                 '/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i',
92 92
                 // WebKit/Trident/NetFront/NetSurf/Amaya/Lynx/w3m/Goanna
93
-                '/(khtml|tasman|links)[\/\s]\(?([\w\.]+)/i',                          // KHTML/Tasman/Links
93
+                '/(khtml|tasman|links)[\/\s]\(?([\w\.]+)/i', // KHTML/Tasman/Links
94 94
                 '/(icab)[\/\s]([23]\.[\d\.]+)/i'                                      // iCab
95 95
             ], [self::NAME, self::VERSION], [
96 96
 
Please login to merge, or discard this patch.
src/Detector/DeviceDetector.php 1 patch
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -105,11 +105,11 @@  discard block
 block discarded – undo
105 105
                 '/(apple\s{0,1}tv)/i'                                                 // Apple TV
106 106
             ], [[self::MODEL, 'Apple TV'], [self::VENDOR, 'Apple']], [
107 107
 
108
-                '/(archos)\s(gamepad2?)/i',                                           // Archos
109
-                '/(hp).+(touchpad)/i',                                                // HP TouchPad
110
-                '/(hp).+(tablet)/i',                                                  // HP Tablet
111
-                '/(kindle)\/([\w\.]+)/i',                                             // Kindle
112
-                '/\s(nook)[\w\s]+build\/(\w+)/i',                                     // Nook
108
+                '/(archos)\s(gamepad2?)/i', // Archos
109
+                '/(hp).+(touchpad)/i', // HP TouchPad
110
+                '/(hp).+(tablet)/i', // HP Tablet
111
+                '/(kindle)\/([\w\.]+)/i', // Kindle
112
+                '/\s(nook)[\w\s]+build\/(\w+)/i', // Nook
113 113
                 '/(dell)\s(strea[kpr\s\d]*[\dko])/i'                                  // Dell Streak
114 114
             ], [self::VENDOR, self::MODEL, [self::TYPE, self::TABLET]], [
115 115
 
@@ -125,10 +125,10 @@  discard block
 block discarded – undo
125 125
                 '/\((ip[honed|\s\w*]+);/i'                                            // iPod/iPhone
126 126
             ], [self::MODEL, [self::VENDOR, 'Apple'], [self::TYPE, self::MOBILE]], [
127 127
 
128
-                '/(blackberry)[\s-]?(\w+)/i',                                         // BlackBerry
128
+                '/(blackberry)[\s-]?(\w+)/i', // BlackBerry
129 129
                 '/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[\s_-]?([\w-]*)/i',
130 130
                 // BenQ/Palm/Sony-Ericsson/Acer/Asus/Dell/Meizu/Motorola/Polytron
131
-                '/(hp)\s([\w\s]+\w)/i',                                               // HP iPAQ
131
+                '/(hp)\s([\w\s]+\w)/i', // HP iPAQ
132 132
                 '/(asus)-?(\w+)/i'                                                    // Asus
133 133
             ], [self::VENDOR, self::MODEL, [self::TYPE, self::MOBILE]], [
134 134
                 '/\(bb10;\s(\w+)/i'                                                   // BlackBerry 10
@@ -137,13 +137,13 @@  discard block
 block discarded – undo
137 137
                 '/android.+(transfo[prime\s]{4,10}\s\w+|eeepc|slider\s\w+|nexus 7|padfone|p00c)/i'
138 138
             ], [self::MODEL, [self::VENDOR, 'Asus'], [self::TYPE, self::TABLET]], [
139 139
 
140
-                '/(sony)\s(tablet\s[ps])\sbuild\//i',                                  // Sony
140
+                '/(sony)\s(tablet\s[ps])\sbuild\//i', // Sony
141 141
                 '/(sony)?(?:sgp.+)\sbuild\//i'
142 142
             ], [[self::VENDOR, 'Sony'], [self::MODEL, 'Xperia Tablet'], [self::TYPE, self::TABLET]], [
143 143
                 '/android.+\s([c-g]\d{4}|so[-l]\w+)(?=\sbuild\/|\).+chrome\/(?![1-6]{0,1}\d\.))/i'
144 144
             ], [self::MODEL, [self::VENDOR, 'Sony'], [self::TYPE, self::MOBILE]], [
145 145
 
146
-                '/\s(ouya)\s/i',                                                      // Ouya
146
+                '/\s(ouya)\s/i', // Ouya
147 147
                 '/(nintendo)\s([wids3u]+)/i'                                          // Nintendo
148 148
             ], [self::VENDOR, self::MODEL, [self::TYPE, self::CONSOLE]], [
149 149
 
@@ -156,8 +156,8 @@  discard block
 block discarded – undo
156 156
                 '/(sprint\s(\w+))/i'                                                  // Sprint Phones
157 157
             ], [[self::VENDOR, '__str', 'sprint.vendor'], [self::MODEL, '__str', 'sprint.model'], [self::TYPE, self::MOBILE]], [
158 158
 
159
-                '/(htc)[;_\s-]+([\w\s]+(?=\)|\sbuild)|\w+)/i',                        // HTC
160
-                '/(zte)-(\w*)/i',                                                     // ZTE
159
+                '/(htc)[;_\s-]+([\w\s]+(?=\)|\sbuild)|\w+)/i', // HTC
160
+                '/(zte)-(\w*)/i', // ZTE
161 161
                 '/(alcatel|geeksphone|nexian|panasonic|(?=;\s)sony)[_\s-]?([\w-]*)/i'
162 162
                 // Alcatel/GeeksPhone/Nexian/Panasonic/Sony
163 163
             ], [self::VENDOR, [self::MODEL, '/_/', ' '], [self::TYPE, self::MOBILE]], [
@@ -197,7 +197,7 @@  discard block
 block discarded – undo
197 197
 
198 198
                 '/android.+((sch-i[89]0\d|shw-m380s|gt-p\d{4}|gt-n\d+|sgh-t8[56]9|nexus 10))/i',
199 199
                 '/((SM-T\w+))/i'
200
-            ], [[self::VENDOR, 'Samsung'], self::MODEL, [self::TYPE, self::TABLET]], [                  // Samsung
200
+            ], [[self::VENDOR, 'Samsung'], self::MODEL, [self::TYPE, self::TABLET]], [// Samsung
201 201
                 '/smart-tv.+(samsung)/i'
202 202
             ], [self::VENDOR, [self::TYPE, self::SMART_TV], self::MODEL], [
203 203
                 '/((s[cgp]h-\w+|gt-\w+|galaxy\snexus|sm-\w[\w\d]+))/i',
@@ -208,7 +208,7 @@  discard block
 block discarded – undo
208 208
                 '/sie-(\w*)/i'                                                        // Siemens
209 209
             ], [self::MODEL, [self::VENDOR, 'Siemens'], [self::TYPE, self::MOBILE]], [
210 210
 
211
-                '/(maemo|nokia).*(n900|lumia\s\d+)/i',                                // Nokia
211
+                '/(maemo|nokia).*(n900|lumia\s\d+)/i', // Nokia
212 212
                 '/(nokia)[\s_-]?([\w-]*)/i'
213 213
             ], [[self::VENDOR, 'Nokia'], self::MODEL, [self::TYPE, self::MOBILE]], [
214 214
 
@@ -221,7 +221,7 @@  discard block
 block discarded – undo
221 221
             ], [[self::VENDOR, 'LG'], self::MODEL, [self::TYPE, self::TABLET]], [
222 222
                 '/(lg) netcast\.tv/i'                                                 // LG SMART_TV
223 223
             ], [self::VENDOR, self::MODEL, [self::TYPE, self::SMART_TV]], [
224
-                '/(nexus\s[45])/i',                                                   // LG
224
+                '/(nexus\s[45])/i', // LG
225 225
                 '/lg[e;\s\/-]+(\w*)/i',
226 226
                 '/android.+lg(\-?[\d\w]+)\s+build/i'
227 227
             ], [self::MODEL, [self::VENDOR, 'LG'], [self::TYPE, self::MOBILE]], [
@@ -254,8 +254,8 @@  discard block
 block discarded – undo
254 254
                 '/android.+;\s(pixel( [23])?( xl)?)[\s)]/i'                              // Google Pixel
255 255
             ], [self::MODEL, [self::VENDOR, 'Google'], [self::TYPE, self::MOBILE]], [
256 256
 
257
-                '/android.+;\s(\w+)\s+build\/hm\1/i',                                 // Xiaomi Hongmi 'numeric' models
258
-                '/android.+(hm[\s\-_]*note?[\s_]*(?:\d\w)?)\s+build/i',               // Xiaomi Hongmi
257
+                '/android.+;\s(\w+)\s+build\/hm\1/i', // Xiaomi Hongmi 'numeric' models
258
+                '/android.+(hm[\s\-_]*note?[\s_]*(?:\d\w)?)\s+build/i', // Xiaomi Hongmi
259 259
                 '/android.+(mi[\s\-_]*(?:a\d|one|one[\s_]plus|note lte)?[\s_]*(?:\d?\w?)[\s_]*(?:plus)?)\s+build/i',
260 260
                 // Xiaomi Mi
261 261
                 '/android.+(redmi[\s\-_]*(?:note)?(?:[\s_]*[\w\s]+))\s+build/i'       // Redmi Phones
@@ -267,7 +267,7 @@  discard block
 block discarded – undo
267 267
                 '/(mz)-([\w-]{2,})/i'
268 268
             ], [[self::VENDOR, 'Meizu'], self::MODEL, [self::TYPE, self::MOBILE]], [
269 269
 
270
-                '/android.+a000(1)\s+build/i',                                        // OnePlus
270
+                '/android.+a000(1)\s+build/i', // OnePlus
271 271
                 '/android.+oneplus\s(a\d{4})\s+build/i'
272 272
             ], [self::MODEL, [self::VENDOR, 'OnePlus'], [self::TYPE, self::MOBILE]], [
273 273
 
@@ -309,13 +309,13 @@  discard block
 block discarded – undo
309 309
             ], [self::MODEL, [self::VENDOR, 'NextBook'], [self::TYPE, self::TABLET]], [
310 310
 
311 311
                 '/android.+[;\/]\s*(Xtreme\_)?(V(1[045]|2[015]|30|40|60|7[05]|90))\s+build/i'
312
-            ], [[self::VENDOR, 'Voice'], self::MODEL, [self::TYPE, self::MOBILE]], [                    // Voice Xtreme Phones
312
+            ], [[self::VENDOR, 'Voice'], self::MODEL, [self::TYPE, self::MOBILE]], [// Voice Xtreme Phones
313 313
 
314 314
                 '/android.+[;\/]\s*(LVTEL\-)?(V1[12])\s+build/i'                     // LvTel Phones
315 315
             ], [[self::VENDOR, 'LvTel'], self::MODEL, [self::TYPE, self::MOBILE]], [
316 316
 
317 317
                 '/android.+;\s(PH-1)\s/i'
318
-            ], [self::MODEL, [self::VENDOR, 'Essential'], [self::TYPE, self::MOBILE]], [                // Essential PH-1
318
+            ], [self::MODEL, [self::VENDOR, 'Essential'], [self::TYPE, self::MOBILE]], [// Essential PH-1
319 319
 
320 320
                 '/android.+[;\/]\s*(V(100MD|700NA|7011|917G).*\b)\s+build/i'          // Envizen Tablets
321 321
             ], [self::MODEL, [self::VENDOR, 'Envizen'], [self::TYPE, self::TABLET]], [
@@ -338,7 +338,7 @@  discard block
 block discarded – undo
338 338
                 '/android.+(Gigaset)[\s\-]+(Q\w{1,9})\s+build/i'                      // Gigaset Tablets
339 339
             ], [self::VENDOR, self::MODEL, [self::TYPE, self::TABLET]], [
340 340
 
341
-                '/\s(tablet|tab)[;\/]/i',                                             // Unidentifiable Tablet
341
+                '/\s(tablet|tab)[;\/]/i', // Unidentifiable Tablet
342 342
                 '/\s(mobile)(?:[;\/]|\ssafari)/i'                                     // Unidentifiable Mobile
343 343
             ], [[self::TYPE, '__lowerize'], self::VENDOR, self::MODEL], [
344 344
 
Please login to merge, or discard this patch.
src/Detector/BrowserDetector.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -94,9 +94,9 @@  discard block
 block discarded – undo
94 94
         return [
95 95
             [
96 96
                 // Presto based
97
-                '/(opera\smini)\/([\w\.-]+)/i',                                       // Opera Mini
98
-                '/(opera\s[mobiletab]+).+version\/([\w\.-]+)/i',                      // Opera Mobi/Tablet
99
-                '/(opera).+version\/([\w\.]+)/i',                                     // Opera > 9.80
97
+                '/(opera\smini)\/([\w\.-]+)/i', // Opera Mini
98
+                '/(opera\s[mobiletab]+).+version\/([\w\.-]+)/i', // Opera Mobi/Tablet
99
+                '/(opera).+version\/([\w\.]+)/i', // Opera > 9.80
100 100
                 '/(opera)[\/\s]+([\w\.]+)/i'                                          // Opera < 9.80
101 101
             ], [self::NAME, self::VERSION], [
102 102
                 '/(opios)[\/\s]+([\w\.]+)/i'                                        // Opera mini on iphone >= 8.0
@@ -104,18 +104,18 @@  discard block
 block discarded – undo
104 104
                 '/\s(opr)\/([\w\.]+)/i'                                              // Opera Webkit
105 105
             ], [[self::NAME, 'Opera'], self::VERSION], [
106 106
                 // Mixed
107
-                '/(kindle)\/([\w\.]+)/i',                                             // Kindle
107
+                '/(kindle)\/([\w\.]+)/i', // Kindle
108 108
                 '/(lunascape|maxthon|netfront|jasmine|blazer)[\/\s]?([\w\.]*)/i',
109 109
                 // Lunascape/Maxthon/Netfront/Jasmine/Blazer
110 110
 
111 111
                 // Trident based
112 112
                 '/(avant\s|iemobile|slim|baidu)(?:browser)?[\/\s]?([\w\.]*)/i',
113 113
                 // Avant/IEMobile/SlimBrowser/Baidu
114
-                '/(?:ms|\()(ie)\s([\w\.]+)/i',                                        // Internet Explorer
114
+                '/(?:ms|\()(ie)\s([\w\.]+)/i', // Internet Explorer
115 115
 
116 116
                 // Webkit/KHTML based
117
-                '/(rekonq)\/([\w\.]*)/i',                                             // Rekonq
118
-                '/(Instagram)\s([\w\.]+)/i',                                               // Instagram inApp Browser
117
+                '/(rekonq)\/([\w\.]*)/i', // Rekonq
118
+                '/(Instagram)\s([\w\.]+)/i', // Instagram inApp Browser
119 119
                 '/(chromium|flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon)\/([\w\.-]+)/i'
120 120
                 // Chromium/Flock/RockMelt/Midori/Epiphany/Silk/Skyfire/Bolt/Iron/Iridium/PhantomJS/Bowser/QupZilla/Falkon
121 121
             ], [self::NAME, self::VERSION], [
@@ -178,7 +178,7 @@  discard block
 block discarded – undo
178 178
                 '/;(fbav)\/([\w\.]+);/i'                                                // Facebook App for iOS & Android
179 179
             ], [[self::NAME, 'Facebook'], self::VERSION], [
180 180
 
181
-                '/safari\s(line)\/([\w\.]+)/i',                                       // Line App for iOS
181
+                '/safari\s(line)\/([\w\.]+)/i', // Line App for iOS
182 182
                 '/android.+(line)\/([\w\.]+)\/iab/i'                                  // Line App for Android
183 183
             ], [self::NAME, self::VERSION], [
184 184
 
@@ -189,7 +189,7 @@  discard block
 block discarded – undo
189 189
             ], [[self::NAME, '/(.+)/', '$1 WebView'], self::VERSION], [
190 190
 
191 191
                 '/((?:oculus|samsung)browser)\/([\w\.]+)/i'
192
-            ], [[self::NAME, "/(.+(?:g|us))(.+)/", '$1 $2'], self::VERSION], [                // Oculus / Samsung Browser
192
+            ], [[self::NAME, "/(.+(?:g|us))(.+)/", '$1 $2'], self::VERSION], [// Oculus / Samsung Browser
193 193
 
194 194
                 '/android.+version\/([\w\.]+)\s+(?:mobile\s?safari|safari)*/i'        // Android Browser
195 195
             ], [self::VERSION, [self::NAME, 'Android Browser']], [
@@ -231,20 +231,20 @@  discard block
 block discarded – undo
231 231
                 // Gecko based
232 232
                 '/(navigator|netscape)\/([\w\.-]+)/i'                                 // Netscape
233 233
             ], [[self::NAME, 'Netscape'], self::VERSION], [
234
-                '/(swiftfox)/i',                                                      // Swiftfox
234
+                '/(swiftfox)/i', // Swiftfox
235 235
                 '/(icedragon|iceweasel|camino|chimera|fennec|maemo\sbrowser|minimo|conkeror)[\/\s]?([\w\.\+]+)/i',
236 236
                 // IceDragon/Iceweasel/Camino/Chimera/Fennec/Maemo/Minimo/Conkeror
237 237
                 '/(firefox|seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([\w\.-]+)$/i',
238 238
 
239 239
                 // Firefox/SeaMonkey/K-Meleon/IceCat/IceApe/Firebird/Phoenix
240
-                '/(mozilla)\/([\w\.]+).+rv\:.+gecko\/\d+/i',                          // Mozilla
240
+                '/(mozilla)\/([\w\.]+).+rv\:.+gecko\/\d+/i', // Mozilla
241 241
 
242 242
                 // Other
243 243
                 '/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir)[\/\s]?([\w\.]+)/i',
244 244
                 // Polaris/Lynx/Dillo/iCab/Doris/Amaya/w3m/NetSurf/Sleipnir
245
-                '/(links)\s\(([\w\.]+)/i',                                            // Links
246
-                '/(gobrowser)\/?([\w\.]*)/i',                                         // GoBrowser
247
-                '/(ice\s?browser)\/v?([\w\._]+)/i',                                   // ICE Browser
245
+                '/(links)\s\(([\w\.]+)/i', // Links
246
+                '/(gobrowser)\/?([\w\.]*)/i', // GoBrowser
247
+                '/(ice\s?browser)\/v?([\w\._]+)/i', // ICE Browser
248 248
                 '/(mosaic)[\/\s]([\w\.]+)/i'                                          // Mosaic
249 249
             ], [self::NAME, self::VERSION],
250 250
         ];
Please login to merge, or discard this patch.
src/Detector/AbstractDetector.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
      * The current entity
93 93
      * @var Browser|Cpu|Os|Device|Engine
94 94
      */
95
-    protected Browser|Cpu|Os|Device|Engine $entity;
95
+    protected Browser | Cpu | Os | Device | Engine $entity;
96 96
 
97 97
     /**
98 98
      * Create new instance
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
         $match = '';
117 117
         $matches = [];
118 118
 
119
-        while ($i < $regexLength && ! $matches) {
119
+        while ($i < $regexLength && !$matches) {
120 120
             $reg = $regex[$i];
121 121
             $property = $regex[$i + 1];
122 122
 
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
             $k = 0;
125 125
 
126 126
             $regLength = count($reg);
127
-            while ($j < $regLength && ! $matches) {
127
+            while ($j < $regLength && !$matches) {
128 128
                 $pattern = $reg[$j++];
129 129
                 if (is_string($pattern)) {
130 130
                     preg_match($pattern, $userAgent, $matches);
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
                                     }
166 166
                                     $this->fillEntity([$q[0] => $result]);
167 167
                                 } else {
168
-                                    $replacedMatch = preg_replace($q[1], $q[2], (string)$match);
168
+                                    $replacedMatch = preg_replace($q[1], $q[2], (string) $match);
169 169
                                     if ($replacedMatch !== null) {
170 170
                                         $this->fillEntity([$q[0] => $replacedMatch]);
171 171
                                     }
@@ -173,7 +173,7 @@  discard block
 block discarded – undo
173 173
                             } elseif (count($q) === 4) {
174 174
                                 if (Helper::startsWith($q[3], '__')) {
175 175
                                     $functionName = Helper::replaceFirst('__', '', $q[3]);
176
-                                    $result = preg_replace($q[1], $q[2], (string)$match);
176
+                                    $result = preg_replace($q[1], $q[2], (string) $match);
177 177
                                     if (method_exists($this, $functionName)) {
178 178
                                         $result = $this->{$functionName}($result);
179 179
                                     }
@@ -196,7 +196,7 @@  discard block
 block discarded – undo
196 196
      * Return the entity instance
197 197
      * @return Browser|Cpu|Os|Device|Engine
198 198
      */
199
-    public function entity(): Browser|Cpu|Os|Device|Engine
199
+    public function entity(): Browser | Cpu | Os | Device | Engine
200 200
     {
201 201
         return $this->entity;
202 202
     }
@@ -242,7 +242,7 @@  discard block
 block discarded – undo
242 242
      * @param string $str
243 243
      * @return string|string[]|null
244 244
      */
245
-    protected function trim(string $str): string|array|null
245
+    protected function trim(string $str): string | array | null
246 246
     {
247 247
         return preg_replace(
248 248
             '/^[\s\xA0]+|[\s\xA0]+$/',
Please login to merge, or discard this patch.