@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -declare(strict_types = 1); |
|
2 | +declare(strict_types=1); |
|
3 | 3 | namespace hexydec\agentzero; |
4 | 4 | |
5 | 5 | class categories { |
@@ -19,7 +19,7 @@ discard block |
||
19 | 19 | 'type' => 'human', |
20 | 20 | 'category' => 'mobile' |
21 | 21 | ]), |
22 | - 'Moblie' => new props('exact', [ // some samsung devices mispelt it |
|
22 | + 'Moblie' => new props('exact', [// some samsung devices mispelt it |
|
23 | 23 | 'type' => 'human', |
24 | 24 | 'category' => 'mobile' |
25 | 25 | ]), |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -declare(strict_types = 1); |
|
2 | +declare(strict_types=1); |
|
3 | 3 | namespace hexydec\agentzero; |
4 | 4 | |
5 | 5 | class apps { |
@@ -11,7 +11,7 @@ discard block |
||
11 | 11 | */ |
12 | 12 | public static function get() : array { |
13 | 13 | $fn = [ |
14 | - 'appslash' => function (string $value, int $i, array $tokens, string $match) : array { |
|
14 | + 'appslash' => function(string $value, int $i, array $tokens, string $match) : array { |
|
15 | 15 | if (\mb_stripos($value, 'AppleWebKit') !== 0 && !\str_contains($value, '://')) { |
16 | 16 | $parts = \explode('/', $value, 4); |
17 | 17 | $offset = isset($parts[2]) ? 1 : 0; |
@@ -45,7 +45,7 @@ discard block |
||
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,20 +54,20 @@ discard block |
||
54 | 54 | } |
55 | 55 | ]; |
56 | 56 | return [ |
57 | - 'com.google.GoogleMobile/' => new props('start', function (string $value, int $i, array $tokens, string $match) use ($fn) : array { |
|
57 | + 'com.google.GoogleMobile/' => new props('start', function(string $value, int $i, array $tokens, string $match) use ($fn) : array { |
|
58 | 58 | return \array_merge($fn['appslash']($value, $i, $tokens, $match), [ |
59 | 59 | 'category' => 'mobile' |
60 | 60 | ]); |
61 | 61 | }), |
62 | 62 | 'com.google.' => new props('start', $fn['appslash']), |
63 | - 'OcIdWebView' => new props('exact', function (string $value) : array { |
|
63 | + 'OcIdWebView' => new props('exact', function(string $value) : array { |
|
64 | 64 | $data = [ |
65 | 65 | 'app' => 'Google App Web View', |
66 | 66 | 'appname' => $value |
67 | 67 | ]; |
68 | 68 | return $data; |
69 | 69 | }), |
70 | - 'Instagram' => new props('any', function (string $value, int $i, array $tokens) : array { |
|
70 | + 'Instagram' => new props('any', function(string $value, int $i, array $tokens) : array { |
|
71 | 71 | $parts = \explode(' ', $value, 4); |
72 | 72 | $data = [ |
73 | 73 | 'type' => 'human', |
@@ -161,7 +161,7 @@ discard block |
||
161 | 161 | 'AppleExchangeWebServices/' => new props('start', $fn['appslash']), |
162 | 162 | |
163 | 163 | // special parser for Facebook app because it is completely different to any other |
164 | - 'FBAN/' => new props('any', function (string $value) : array { |
|
164 | + 'FBAN/' => new props('any', function(string $value) : array { |
|
165 | 165 | $map = [ |
166 | 166 | 'FBAN/MessengerLiteForiOS' => [ |
167 | 167 | 'type' => 'human', |
@@ -217,7 +217,7 @@ discard block |
||
217 | 217 | 'model' => \mb_substr($value, 5) |
218 | 218 | ]), |
219 | 219 | 'FBLC/' => new props('start', $fn['langslash']), |
220 | - 'FBDM/' => new props('start', function (string $value) : array { |
|
220 | + 'FBDM/' => new props('start', function(string $value) : array { |
|
221 | 221 | $data = []; |
222 | 222 | foreach (\explode(',', \trim(\mb_substr($value, 5), '{}')) AS $item) { |
223 | 223 | $parts = \explode('=', $item); |
@@ -245,7 +245,7 @@ discard block |
||
245 | 245 | 'FBSV' => new props('start', fn (string $value) : array => [ |
246 | 246 | 'platformversion' => \mb_substr($value, 5) |
247 | 247 | ]), |
248 | - 'isDarkMode/' => new props('start', function (string $value) : array { |
|
248 | + 'isDarkMode/' => new props('start', function(string $value) : array { |
|
249 | 249 | $mode = \mb_substr($value, 11); |
250 | 250 | return [ |
251 | 251 | 'darkmode' => \in_array($mode, ['0', '1'], true) ? \boolval($mode) : null |
@@ -255,7 +255,7 @@ discard block |
||
255 | 255 | 'NetType/' => new props('start', fn (string $value) : array => [ |
256 | 256 | 'nettype' => \mb_convert_case(\mb_substr($value, 8), MB_CASE_UPPER) |
257 | 257 | ]), |
258 | - 'Microsoft Office' => new props('start', function (string $value, int $i, array $tokens) : array { |
|
258 | + 'Microsoft Office' => new props('start', function(string $value, int $i, array $tokens) : array { |
|
259 | 259 | $data = [ |
260 | 260 | 'type' => 'human' |
261 | 261 | ]; |