Passed
Push — main ( e55150...6ce6d7 )
by Will
02:49
created
src/helpers/props.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 block discarded – undo
1 1
 <?php
2
-declare(strict_types = 1);
2
+declare(strict_types=1);
3 3
 namespace hexydec\agentzero;
4 4
 
5 5
 class props {
Please login to merge, or discard this patch.
src/mappings/languages.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-declare(strict_types = 1);
2
+declare(strict_types=1);
3 3
 namespace hexydec\agentzero;
4 4
 
5 5
 /**
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
 			'zu' => 'Zulu',
137 137
 			'in' => 'India'
138 138
 		];
139
-		$fn = function (string $value, int $i, array $tokens, string $match) : ?array {
139
+		$fn = function(string $value, int $i, array $tokens, string $match) : ?array {
140 140
 			if ($value === $match) {
141 141
 				return ['language' => $value];
142 142
 			} else {
Please login to merge, or discard this patch.
src/mappings/browsers.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-declare(strict_types = 1);
2
+declare(strict_types=1);
3 3
 namespace hexydec\agentzero;
4 4
 
5 5
 /**
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
 	 */
15 15
 	public static function get() : array {
16 16
 		$fn = [
17
-			'browserslash' => function (string $value) : array {
17
+			'browserslash' => function(string $value) : array {
18 18
 				if (($browser = \mb_strrchr($value, ' ')) !== false) {
19 19
 					$value = \ltrim($browser);
20 20
 				}
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
 				}
52 52
 				return $data;
53 53
 			},
54
-			'presto' => function (string $value) : array {
54
+			'presto' => function(string $value) : array {
55 55
 				$parts = \explode('/', $value, 2);
56 56
 				return [
57 57
 					'type' => 'human',
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
 					'engineversion' => $parts[1] ?? null
62 62
 				];
63 63
 			},
64
-			'chromium' => function (string $value) : array {
64
+			'chromium' => function(string $value) : array {
65 65
 				$parts = \explode('/', $value, 3);
66 66
 				return [
67 67
 					'type' => 'human',
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
 				'type' => 'human',
123 123
 				'category' => 'desktop'
124 124
 			]),
125
-			'Midori' => new props('start', function (string $value) : array {
125
+			'Midori' => new props('start', function(string $value) : array {
126 126
 				$parts = \explode('/', $value, 2);
127 127
 				return [
128 128
 					'type' => 'human',
@@ -138,14 +138,14 @@  discard block
 block discarded – undo
138 138
 				'browserversion' => \mb_substr($value, 7),
139 139
 				'engineversion' => \mb_substr($value, 7)
140 140
 			]),
141
-			'Firefox/' => new props('start', function (string $value) use ($fn) : array {
141
+			'Firefox/' => new props('start', function(string $value) use ($fn) : array {
142 142
 				$data = $fn['browserslash']($value);
143 143
 				return \array_merge($data, [
144 144
 					'engine' => 'Gecko',
145 145
 					'engineversion' => $data['browserversion'] ?? null
146 146
 				]);
147 147
 			}),
148
-			' Firefox/' => new props('any', function (string $value) use ($fn) : array {
148
+			' Firefox/' => new props('any', function(string $value) use ($fn) : array {
149 149
 				$data = $fn['browserslash']($value);
150 150
 				return \array_merge($data, [
151 151
 					'engine' => 'Gecko',
@@ -157,13 +157,13 @@  discard block
 block discarded – undo
157 157
 				'engine' => 'Gecko',
158 158
 				'browser' => 'Firefox'
159 159
 			]),
160
-			'Minimo/' => new props('start', function (string $value) use ($fn) : array {
160
+			'Minimo/' => new props('start', function(string $value) use ($fn) : array {
161 161
 				$data = $fn['browserslash']($value);
162 162
 				return \array_merge($data, [
163 163
 					'engine' => 'Gecko'
164 164
 				]);
165 165
 			}),
166
-			'BonEcho/' => new props('start', function (string $value) use ($fn) : array {
166
+			'BonEcho/' => new props('start', function(string $value) use ($fn) : array {
167 167
 				$data = $fn['browserslash']($value);
168 168
 				return \array_merge($data, [
169 169
 					'engine' => 'Gecko'
Please login to merge, or discard this patch.
src/mappings/devices.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-declare(strict_types = 1);
2
+declare(strict_types=1);
3 3
 namespace hexydec\agentzero;
4 4
 
5 5
 /**
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
 	 */
15 15
 	public static function get() : array {
16 16
 		$fn = [
17
-			'ios' => function (string $value, int $i, array $tokens) : array {
17
+			'ios' => function(string $value, int $i, array $tokens) : array {
18 18
 				$version = null;
19 19
 				$model = null;
20 20
 				foreach ($tokens AS $item) {
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
 				'device' => 'Xbox',
47 47
 				'model' => ($model = \mb_substr($value, 5)) === '' ? null : $model
48 48
 			],
49
-			'playstation' => function (string $value) : array {
49
+			'playstation' => function(string $value) : array {
50 50
 				$parts = \explode(' ', $value);
51 51
 				if (\str_contains($parts[1], '/')) {
52 52
 					list($parts[1], $parts[2]) = \explode('/', $parts[1]);
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
 					'bits' => 64
70 70
 				];
71 71
 			},
72
-			'firetablet' => function (string $value) : ?array {
72
+			'firetablet' => function(string $value) : ?array {
73 73
 				$model = \explode(' ', $value)[0];
74 74
 				if (\ctype_alpha($model) && \mb_strlen($model) <= 7) {
75 75
 					return [
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
 				'vendor' => 'Google',
148 148
 				'platformversion' => \mb_substr($value, 7)
149 149
 			]),
150
-			'Apple/' => new props('start', function (string $value) : array {
150
+			'Apple/' => new props('start', function(string $value) : array {
151 151
 				$value = \mb_substr($value, 6);
152 152
 				$split = \strcspn($value, '0123456789');
153 153
 				$device = \mb_substr($value, 0, $split);
@@ -199,7 +199,7 @@  discard block
 block discarded – undo
199 199
 			'googleweblight' => new props('exact', [
200 200
 				'proxy' => 'googleweblight'
201 201
 			]),
202
-			'SAMSUNG-' => new props('start', function (string $value) : array {
202
+			'SAMSUNG-' => new props('start', function(string $value) : array {
203 203
 				$parts = \explode('/', $value, 2);
204 204
 				return [
205 205
 					'type' => 'human',
@@ -212,7 +212,7 @@  discard block
 block discarded – undo
212 212
 			'Samsung' => new props('start', fn (string $value) : ?array => \str_starts_with($value, 'SamsungBrowser') ? null : [
213 213
 				'vendor' => 'Samsung'
214 214
 			]),
215
-			'SM-' => new props('start', function (string $value) : array {
215
+			'SM-' => new props('start', function(string $value) : array {
216 216
 				$parts = \explode('.', \explode(' ', $value)[0]);
217 217
 				return [
218 218
 					'vendor' => 'Samsung',
@@ -223,7 +223,7 @@  discard block
 block discarded – undo
223 223
 			'Acer' => new props('start', [
224 224
 				'vendor' => 'Acer'
225 225
 			]),
226
-			'SonyEricsson' => new props('start', function (string $value) : array {
226
+			'SonyEricsson' => new props('start', function(string $value) : array {
227 227
 				$parts = \explode('/', $value, 2);
228 228
 				return [
229 229
 					'type' => 'human',
@@ -233,7 +233,7 @@  discard block
 block discarded – undo
233 233
 					'build' => $parts[1] ?? null
234 234
 				];
235 235
 			}),
236
-			'LGE' => new props('exact', function (string $value, int $i, array $tokens) : array {
236
+			'LGE' => new props('exact', function(string $value, int $i, array $tokens) : array {
237 237
 				$device = $tokens[++$i] ?? null;
238 238
 				$platformversion = empty($tokens[++$i]) ? null : \mb_substr(\explode(' ', $tokens[$i])[0], 5);
239 239
 				$build = $tokens[++$i] ?? null;
@@ -246,7 +246,7 @@  discard block
 block discarded – undo
246 246
 					'vendor' => 'LG'
247 247
 				];
248 248
 			}),
249
-			'NOKIA' => new props('start', function (string $value) : array {
249
+			'NOKIA' => new props('start', function(string $value) : array {
250 250
 				return \array_merge(devices::getDevice($value), [
251 251
 					'type' => 'human',
252 252
 					'category' => 'mobile',
@@ -270,7 +270,7 @@  discard block
 block discarded – undo
270 270
 				'vendor' => 'Tecno',
271 271
 				'model' => \explode(' ', \str_replace('-', ' ', $value), 2)[1] ?? null
272 272
 			]),
273
-			'ThinkPad' => new props('start', function (string $value, int $i, array $tokens) : array {
273
+			'ThinkPad' => new props('start', function(string $value, int $i, array $tokens) : array {
274 274
 				if (\mb_strpos($tokens[++$i] ?? '', 'Build/') === 0) {
275 275
 					$device = \explode('_', \mb_substr($tokens[$i], 6));
276 276
 				}
@@ -282,7 +282,7 @@  discard block
 block discarded – undo
282 282
 					'build' => $device[2] ?? null
283 283
 				];
284 284
 			}),
285
-			'BlackBerry' => new props('start', function (string $value) : array {
285
+			'BlackBerry' => new props('start', function(string $value) : array {
286 286
 				$parts = \explode('/', $value);
287 287
 				return [
288 288
 					'type' => 'human',
@@ -297,7 +297,7 @@  discard block
 block discarded – undo
297 297
 				'model' => \mb_substr($value, 6)
298 298
 			]),
299 299
 			'Build/' => new props('any', fn (string $value) : array => self::getDevice($value)),
300
-			'x' => new props('any', function (string $value) : ?array {
300
+			'x' => new props('any', function(string $value) : ?array {
301 301
 				$parts = \explode('x', $value);
302 302
 				if (!isset($parts[2]) && \is_numeric($parts[0]) && \is_numeric($parts[1])) {
303 303
 					return [
Please login to merge, or discard this patch.
src/mappings/crawlers.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-declare(strict_types = 1);
2
+declare(strict_types=1);
3 3
 namespace hexydec\agentzero;
4 4
 
5 5
 /**
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
 			'ads' => fn (string $value) : array => self::getApp($value, ['category' => 'ads']),
44 44
 			'validator' => fn (string $value) : array => self::getApp($value, ['category' => 'validator']),
45 45
 			'feed' => fn (string $value) : array => self::getApp($value, ['category' => 'feed']),
46
-			'crawler' => function (string $value) : array {
46
+			'crawler' => function(string $value) : array {
47 47
 				$parts = \explode('/', $value, 2);
48 48
 				$map = [
49 49
 					'baiduspider' => 'search',
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
 			},
60 60
 			'monitor' => fn (string $value) : array => self::getApp($value, ['category' => 'monitor']),
61 61
 			'scraper' => fn (string $value) : array => self::getApp($value, ['category' => 'scraper']),
62
-			'map' => function (string $value) : ?array {
62
+			'map' => function(string $value) : ?array {
63 63
 				if (!\str_contains($value, '://') && \strcasecmp('Cubot', $value) !== 0 && \strcasecmp('Power bot', $value) !== 0) { // bot will be in the URL
64 64
 					$parts = \explode('/', $value, 2);
65 65
 					$category = [
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
 			'Uptime/' => new props('start', $fn['monitor']),
146 146
 			'HostTracker/' => new props('start', $fn['monitor']),
147 147
 			'NCSC Web Check [email protected]' => new props('exact', $fn['monitor']),
148
-			'Pingdom.com' => new props('start', function (string $value) : array {
148
+			'Pingdom.com' => new props('start', function(string $value) : array {
149 149
 				$version = \explode('_', \trim($value, '_'));
150 150
 				return [
151 151
 					'type' => 'robot',
@@ -176,7 +176,7 @@  discard block
 block discarded – undo
176 176
 			'Rogerbot/' => new props('start', $fn['crawler']),
177 177
 			'Go-http-client/' => new props('start', $fn['scraper']),
178 178
 			'DashLinkPreviews/' => new props('start', $fn['feed']),
179
-			'Microsoft Office' => new props('start', function (string $value, int $i, array $tokens) : array {
179
+			'Microsoft Office' => new props('start', function(string $value, int $i, array $tokens) : array {
180 180
 				$data = [
181 181
 					'type' => 'human'
182 182
 				];
Please login to merge, or discard this patch.
src/mappings/urls.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-declare(strict_types = 1);
2
+declare(strict_types=1);
3 3
 namespace hexydec\agentzero;
4 4
 
5 5
 /**
@@ -13,7 +13,7 @@  discard block
 block discarded – undo
13 13
 	 * @return props An array with keys representing the string to match, and a value of an array containing parsing and output settings
14 14
 	 */
15 15
 	public static function get() : array {
16
-		$fn = function (string $value, int $i, array $tokens) : ?array {
16
+		$fn = function(string $value, int $i, array $tokens) : ?array {
17 17
 			if (($start = \stripos($value, 'http://')) === false) {
18 18
 				if (($start = \stripos($value, 'https://')) === false) {
19 19
 					$start = \stripos($value, 'www.');
Please login to merge, or discard this patch.
src/mappings/apps.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-declare(strict_types = 1);
2
+declare(strict_types=1);
3 3
 namespace hexydec\agentzero;
4 4
 
5 5
 /**
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
 	 */
15 15
 	public static function get() : array {
16 16
 		$fn = [
17
-			'appslash' => function (string $value, int $i, array $tokens, string $match) : array {
17
+			'appslash' => function(string $value, int $i, array $tokens, string $match) : array {
18 18
 				if (\mb_stripos($value, 'AppleWebKit') !== 0 && !\str_contains($value, '://')) {
19 19
 					$parts = \explode('/', $value, 4);
20 20
 					$offset = isset($parts[2]) ? 1 : 0;
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
 				}
46 46
 				return [];
47 47
 			},
48
-			'langslash' => function (string $value) : array {
48
+			'langslash' => function(string $value) : array {
49 49
 				$parts = \explode('-', \str_replace('_', '-', \explode('/', $value, 2)[1]), 4);
50 50
 				$suffix = $parts[2] ?? $parts[1] ?? null;
51 51
 				return [
@@ -54,19 +54,19 @@  discard block
 block discarded – undo
54 54
 			}
55 55
 		];
56 56
 		return [
57
-			'OcIdWebView' => new props('exact', function (string $value) : array {
57
+			'OcIdWebView' => new props('exact', function(string $value) : array {
58 58
 				$data = [
59 59
 					'app' => $value
60 60
 				];
61 61
 				return $data;
62 62
 			}),
63
-			'com.google.GoogleMobile/' => new props('start', function (string $value, int $i, array $tokens, string $match) use ($fn) : array {
63
+			'com.google.GoogleMobile/' => new props('start', function(string $value, int $i, array $tokens, string $match) use ($fn) : array {
64 64
 				return \array_merge($fn['appslash']($value, $i, $tokens, $match), [
65 65
 					'category' => 'mobile'
66 66
 				]);
67 67
 			}),
68 68
 			'com.google.' => new props('start', $fn['appslash']),
69
-			'Instagram' => new props('any', function (string $value, int $i, array $tokens) : array {
69
+			'Instagram' => new props('any', function(string $value, int $i, array $tokens) : array {
70 70
 				$parts = \explode(' ', $value, 4);
71 71
 				$data = [
72 72
 					'type' => 'human',
@@ -153,7 +153,7 @@  discard block
 block discarded – undo
153 153
 			'Viber/' => new props('start', $fn['appslash']),
154 154
 
155 155
 			// special parser for Facebook app because it is completely different to any other
156
-			'FBAN/' => new props('any', function (string $value) : array {
156
+			'FBAN/' => new props('any', function(string $value) : array {
157 157
 				$map = [
158 158
 					'FBAN/MessengerLiteForiOS' => [
159 159
 						'type' => 'human',
@@ -207,7 +207,7 @@  discard block
 block discarded – undo
207 207
 				'model' => \mb_substr($value, 5)
208 208
 			]),
209 209
 			'FBLC/' => new props('start', $fn['langslash']),
210
-			'FBDM/' => new props('start', function (string $value) : array {
210
+			'FBDM/' => new props('start', function(string $value) : array {
211 211
 				$data = [];
212 212
 				foreach (\explode(',', \trim(\mb_substr($value, 5), '{}')) AS $item) {
213 213
 					$parts = \explode('=', $item);
@@ -235,7 +235,7 @@  discard block
 block discarded – undo
235 235
 			'FBSV' => new props('start', fn (string $value) : array => [
236 236
 				'platformversion' => \mb_substr($value, 5)
237 237
 			]),
238
-			'isDarkMode/' => new props('start', function (string $value) : array {
238
+			'isDarkMode/' => new props('start', function(string $value) : array {
239 239
 				$mode = \mb_substr($value, 11);
240 240
 				return [
241 241
 					'darkmode' => \in_array($mode, ['0', '1'], true) ? \boolval($mode) : null
Please login to merge, or discard this patch.
src/mappings/platforms.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-declare(strict_types = 1);
2
+declare(strict_types=1);
3 3
 namespace hexydec\agentzero;
4 4
 
5 5
 /**
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
 	 */
15 15
 	public static function get() : array {
16 16
 		$fn = [
17
-			'platformlinux' => function (string $value) : array {
17
+			'platformlinux' => function(string $value) : array {
18 18
 				if (!\str_starts_with($value, 'Red Hat/') && ($platform = \mb_strstr($value, ' ', true)) !== false) {
19 19
 					$value = $platform;
20 20
 				}
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
 					'platformversion' => $parts[1] ?? null
34 34
 				];
35 35
 			},
36
-			'platformwindows' => function (string $value) : array {
36
+			'platformwindows' => function(string $value) : array {
37 37
 				$mapping = [
38 38
 					'5.0' => '2000',
39 39
 					'5.1' => 'XP',
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
 					'platformversion' => $mapping[$version] ?? $version
60 60
 				];
61 61
 			},
62
-			'android' => function (string $value, int $i, array $tokens) : array {
62
+			'android' => function(string $value, int $i, array $tokens) : array {
63 63
 				$os = \explode(' ', $value, 3);
64 64
 
65 65
 				// skip language
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
 
82 82
 			// platforms
83 83
 			'Windows NT ' => new props('any', $fn['platformwindows']),
84
-			'Windows Phone' => new props('start', function (string $value) : array {
84
+			'Windows Phone' => new props('start', function(string $value) : array {
85 85
 				$version = \mb_substr($value, 14);
86 86
 				return [
87 87
 					'type' => 'human',
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
 				'platformversion' => \mb_substr($value, 5)
124 124
 			]),
125 125
 			'Windows' => new props('any', $fn['platformwindows']),
126
-			'Mac OS X' => new props('any', function (string $value) : array {
126
+			'Mac OS X' => new props('any', function(string $value) : array {
127 127
 				$version = \str_replace('_', '.', \mb_substr($value, \mb_stripos($value, 'Mac OS X') + 9));
128 128
 				$register = $version && \intval(\explode('.', $version)[1] ?? 0) >= 6 ? 64 : null;
129 129
 				return [
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
148 148
 				'platform' => 'iOS',
149 149
 				'platformversion' => \mb_substr($value, 4)
150 150
 			]),
151
-			'CrOS' => new props('start', function (string $value) : array {
151
+			'CrOS' => new props('start', function(string $value) : array {
152 152
 				$parts = \explode(' ', $value);
153 153
 				return [
154 154
 					'type' => 'human',
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
 				'platform' => 'Kindle',
164 164
 				'platformversion' => \mb_substr($value, 7)
165 165
 			]),
166
-			'Tizen' => new props('start', function (string $value) : array {
166
+			'Tizen' => new props('start', function(string $value) : array {
167 167
 				$parts = \explode(' ', $value, 2);
168 168
 				return [
169 169
 					'type' => 'human',
@@ -218,7 +218,7 @@  discard block
 block discarded – undo
218 218
 				'kernel' => 'unix',
219 219
 				'platform' => 'Solaris',
220 220
 			]),
221
-			'AmigaOS' => new props('any', function (string $value) : array {
221
+			'AmigaOS' => new props('any', function(string $value) : array {
222 222
 				if (($pos = \mb_stripos($value, 'AmigaOS')) !== false) {
223 223
 					$value = \mb_substr($value, $pos);
224 224
 				}
@@ -231,7 +231,7 @@  discard block
 block discarded – undo
231 231
 					'platformversion' => isset($parts[1]) && \strspn($parts[1], '0123456789.-_') === \strlen($parts[1]) ? $parts[1] : null
232 232
 				];
233 233
 			}),
234
-			'Fuchsia' => new props('exact', function (string $value, int $i, array $tokens) : array {
234
+			'Fuchsia' => new props('exact', function(string $value, int $i, array $tokens) : array {
235 235
 				$os = \explode(' ', $tokens[++$i], 2);
236 236
 				return [
237 237
 					'type' => 'human',
@@ -241,7 +241,7 @@  discard block
 block discarded – undo
241 241
 					'platformversion' => isset($os[1]) && \strspn($os[1], '0123456789.-_', \strlen($os[0])) === \strlen($os[1]) ? $os[1] : null
242 242
 				];
243 243
 			}),
244
-			'Maemo' => new props('exact', function (string $value, int $i, array $tokens) : array {
244
+			'Maemo' => new props('exact', function(string $value, int $i, array $tokens) : array {
245 245
 				$os = \explode(' ', $tokens[++$i], 2);
246 246
 				return [
247 247
 					'type' => 'human',
@@ -257,7 +257,7 @@  discard block
 block discarded – undo
257 257
 				'kernel' => 'Java VM',
258 258
 				'platform' => $value
259 259
 			]),
260
-			'Haiku' => new props('any', function (string $value) : array {
260
+			'Haiku' => new props('any', function(string $value) : array {
261 261
 				$parts = \explode('/', $value, 2);
262 262
 				return [
263 263
 					'type' => 'human',
@@ -267,7 +267,7 @@  discard block
 block discarded – undo
267 267
 					'platformversion' => $parts[1] ?? null
268 268
 				];
269 269
 			}),
270
-			'BeOS' => new props('start', function (string $value) : array {
270
+			'BeOS' => new props('start', function(string $value) : array {
271 271
 				$parts = \explode('/', $value, 2);
272 272
 				return [
273 273
 					'type' => 'human',
@@ -279,14 +279,14 @@  discard block
 block discarded – undo
279 279
 			}),
280 280
 			'Android' => new props('exact', $fn['android']),
281 281
 			'Android ' => new props('start', $fn['android']),
282
-			'Linux' => new props('any', function (string $value, int $i, array $tokens) : array {
282
+			'Linux' => new props('any', function(string $value, int $i, array $tokens) : array {
283 283
 				return [
284 284
 					'kernel' => 'Linux',
285 285
 					'platform' => 'Linux',
286 286
 					'platformversion' => \str_contains($tokens[$i + 1] ?? '', '.') && \strspn($tokens[$i + 1], '0123456789.') >= 3 ? \explode(' ', $tokens[$i + 1])[0] : null
287 287
 				];
288 288
 			}),
289
-			'X11' => new props('exact', function (string $value, int $i, array $tokens) : array {
289
+			'X11' => new props('exact', function(string $value, int $i, array $tokens) : array {
290 290
 				$os = \explode(' ', $tokens[++$i] ?? '', 2);
291 291
 				return [
292 292
 					'category' => 'desktop',
Please login to merge, or discard this patch.
src/mappings/other.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-declare(strict_types = 1);
2
+declare(strict_types=1);
3 3
 namespace hexydec\agentzero;
4 4
 
5 5
 /**
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
 	 */
15 15
 	public static function get() : array {
16 16
 		return [
17
-			'{' => new props('any', function (string $value) : ?array {
17
+			'{' => new props('any', function(string $value) : ?array {
18 18
 				if (($start = \mb_strpos($value, '{')) === false) {
19 19
 
20 20
 				} elseif (($end = \mb_strpos($value, '}', $start)) !== false) {
Please login to merge, or discard this patch.