Passed
Push — main ( 50dae2...0a2d45 )
by Will
12:58
created
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;
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
 				}
42 42
 				return null;
43 43
 			},
44
-			'langslash' => function (string $value) : array {
44
+			'langslash' => function(string $value) : array {
45 45
 				$parts = \explode('-', \str_replace('_', '-', \explode('/', $value, 2)[1]), 4);
46 46
 				$suffix = $parts[2] ?? $parts[1] ?? null;
47 47
 				return [
@@ -52,11 +52,11 @@  discard block
 block discarded – undo
52 52
 		return [
53 53
 			'OcIdWebView' => [
54 54
 				'match' => 'exact',
55
-				'categories' => function (string $value, int $i, array $tokens) : array {
55
+				'categories' => function(string $value, int $i, array $tokens) : array {
56 56
 					$data = [
57 57
 						'app' => $value
58 58
 					];
59
-					if (!empty($tokens[$i+1]) && ($json = \json_decode($tokens[$i+1], true)) !== null) {
59
+					if (!empty($tokens[$i + 1]) && ($json = \json_decode($tokens[$i + 1], true)) !== null) {
60 60
 						$data['appversion'] = $json['appVersion'] ?? null;
61 61
 						$data['darkmode'] = isset($json['isDarkTheme']) ? \boolval($json['isDarkTheme']) : null;
62 62
 					}
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
 			],
70 70
 			'Instagram' => [
71 71
 				'match' => 'any',
72
-				'categories' => function (string $value, int $i, array $tokens) : array {
72
+				'categories' => function(string $value, int $i, array $tokens) : array {
73 73
 					$parts = \explode(' ', $value, 4);
74 74
 					$data = [
75 75
 						'type' => 'human',
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
148 148
 			// special parser for Facebook app because it is completely different to any other
149 149
 			'FBAN/' => [
150 150
 				'match' => 'any',
151
-				'categories' => function (string $value) : array {
151
+				'categories' => function(string $value) : array {
152 152
 					$map = [
153 153
 						'FBAN/MessengerLiteForiOS' => [
154 154
 							'type' => 'human',
@@ -225,7 +225,7 @@  discard block
 block discarded – undo
225 225
 			],
226 226
 			'FBDM/' => [
227 227
 				'match' => 'start',
228
-				'categories' => function (string $value) : array {
228
+				'categories' => function(string $value) : array {
229 229
 					$data = [];
230 230
 					foreach (\explode(',', \trim(\mb_substr($value, 5), '{}')) AS $item) {
231 231
 						$parts = \explode('=', $item);
@@ -271,7 +271,7 @@  discard block
 block discarded – undo
271 271
 			],
272 272
 			'isDarkMode/' => [
273 273
 				'match' => 'start',
274
-				'categories' => function (string $value) : array {
274
+				'categories' => function(string $value) : array {
275 275
 					$mode = \mb_substr($value, 11);
276 276
 					return [
277 277
 						'darkmode' => \in_array($mode, ['0', '1'], true) ? \boolval($mode) : null
Please login to merge, or discard this patch.