Passed
Push — main ( 5784d3...50dae2 )
by Will
12:43 queued 09:23
created
src/mappings/platforms.php 1 patch
Spacing   +14 added lines, -14 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
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
 			],
85 85
 			'Windows Phone' => [
86 86
 				'match' => 'start',
87
-				'categories' => function (string $value) : array {
87
+				'categories' => function(string $value) : array {
88 88
 					$version = \mb_substr($value, 14);
89 89
 					return [
90 90
 						'type' => 'human',
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
 			],
126 126
 			'Mac OS X' => [
127 127
 				'match' => 'any',
128
-				'categories' => function (string $value) : array {
128
+				'categories' => function(string $value) : array {
129 129
 					$version = \str_replace('_', '.', \mb_substr($value, \mb_stripos($value, 'Mac OS X') + 9));
130 130
 					$register = $version && \intval(\explode('.', $version)[1] ?? 0) >= 6 ? 64 : null;
131 131
 					return [
@@ -159,7 +159,7 @@  discard block
 block discarded – undo
159 159
 			],
160 160
 			'CrOS' => [
161 161
 				'match' => 'start',
162
-				'categories' => function (string $value) : array {
162
+				'categories' => function(string $value) : array {
163 163
 					$parts = \explode(' ', $value);
164 164
 					return [
165 165
 						'type' => 'human',
@@ -180,7 +180,7 @@  discard block
 block discarded – undo
180 180
 			],
181 181
 			'Tizen' => [
182 182
 				'match' => 'start',
183
-				'categories' => function (string $value) : array {
183
+				'categories' => function(string $value) : array {
184 184
 					$parts = \explode(' ', $value, 2);
185 185
 					return [
186 186
 						'type' => 'human',
@@ -283,7 +283,7 @@  discard block
 block discarded – undo
283 283
 			],
284 284
 			'AmigaOS' => [
285 285
 				'match' => 'any',
286
-				'categories' => function (string $value) : array {
286
+				'categories' => function(string $value) : array {
287 287
 					if (($pos = \mb_stripos($value, 'AmigaOS')) !== false) {
288 288
 						$value = \mb_substr($value, $pos);
289 289
 					}
@@ -299,7 +299,7 @@  discard block
 block discarded – undo
299 299
 			],
300 300
 			'Fuchsia' => [
301 301
 				'match' => 'exact',
302
-				'categories' => function (string $value, int $i, array $tokens) : array {
302
+				'categories' => function(string $value, int $i, array $tokens) : array {
303 303
 					$os = \explode(' ', $tokens[++$i], 2);
304 304
 					return [
305 305
 						'type' => 'human',
@@ -312,7 +312,7 @@  discard block
 block discarded – undo
312 312
 			],
313 313
 			'Maemo' => [
314 314
 				'match' => 'exact',
315
-				'categories' => function (string $value, int $i, array $tokens) : array {
315
+				'categories' => function(string $value, int $i, array $tokens) : array {
316 316
 					$os = \explode(' ', $tokens[++$i], 2);
317 317
 					return [
318 318
 						'type' => 'human',
@@ -334,7 +334,7 @@  discard block
 block discarded – undo
334 334
 			],
335 335
 			'Haiku' => [
336 336
 				'match' => 'any',
337
-				'categories' => function (string $value) : array {
337
+				'categories' => function(string $value) : array {
338 338
 					$parts = \explode('/', $value, 2);
339 339
 					return [
340 340
 						'type' => 'human',
@@ -347,7 +347,7 @@  discard block
 block discarded – undo
347 347
 			],
348 348
 			'BeOS' => [
349 349
 				'match' => 'start',
350
-				'categories' => function (string $value) : array {
350
+				'categories' => function(string $value) : array {
351 351
 					$parts = \explode('/', $value, 2);
352 352
 					return [
353 353
 						'type' => 'human',
@@ -375,7 +375,7 @@  discard block
 block discarded – undo
375 375
 			],
376 376
 			'X11' => [
377 377
 				'match' => 'exact',
378
-				'categories' => function (string $value, int $i, array $tokens) : array {
378
+				'categories' => function(string $value, int $i, array $tokens) : array {
379 379
 					$os = \explode(' ', $tokens[++$i] ?? '', 2);
380 380
 					return [
381 381
 						'category' => 'desktop',
Please login to merge, or discard this patch.