Passed
Push — main ( 607587...1999b9 )
by Will
03:01
created
src/mappings/special.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 special {
Please login to merge, or discard this patch.
src/mappings/crawlers.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
 class crawlers {
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
 					'category' => 'feed'
150 150
 				]
151 151
 			)),
152
-			'crawler' => function (string $value) : array {
152
+			'crawler' => function(string $value) : array {
153 153
 				$parts = \explode('/', $value, 2);
154 154
 				$map = [
155 155
 					'baiduspider' => 'search',
@@ -172,7 +172,7 @@  discard block
 block discarded – undo
172 172
 				'type' => 'robot',
173 173
 				'categpry' => 'scraper'
174 174
 			]),
175
-			'Moblie' => new props('exact', [ // some samsung devices mispelt it
175
+			'Moblie' => new props('exact', [// some samsung devices mispelt it
176 176
 				'type' => 'robot',
177 177
 				'category' => 'scraper'
178 178
 			]),
@@ -192,7 +192,7 @@  discard block
 block discarded – undo
192 192
 			'Siteimprove.com' => new props('any', $fn['crawler']),
193 193
 			'SEOlyt/' => new props('any', $fn['crawler']),
194 194
 			'CyotekWebCopy' => new props('start', $fn['scraper']),
195
-			'Yandex' => new props('start', function (string $value) : array {
195
+			'Yandex' => new props('start', function(string $value) : array {
196 196
 				$parts = \explode('/', $value, 3);
197 197
 				return [
198 198
 					'type' => 'robot',
@@ -203,7 +203,7 @@  discard block
 block discarded – undo
203 203
 				];
204 204
 			}),
205 205
 			'Google Page Speed Insights' => new props('exact', $fn['validator']),
206
-			'Qwantify' => new props('start', function (string $value) : array {
206
+			'Qwantify' => new props('start', function(string $value) : array {
207 207
 				$parts = \explode('/', $value, 3);
208 208
 				return [
209 209
 					'type' => 'robot',
@@ -248,7 +248,7 @@  discard block
 block discarded – undo
248 248
 			'Uptime/' => new props('start', $fn['monitor']),
249 249
 			'HostTracker/' => new props('start', $fn['monitor']),
250 250
 			'NCSC Web Check [email protected]' => new props('exact', $fn['monitor']),
251
-			'Pingdom.com' => new props('start', function (string $value) : array {
251
+			'Pingdom.com' => new props('start', function(string $value) : array {
252 252
 				$version = \explode('_', \trim($value, '_'));
253 253
 				return [
254 254
 					'type' => 'robot',
@@ -277,14 +277,14 @@  discard block
 block discarded – undo
277 277
 			'PhxBot/' => new props('start', $fn['feed']), // proton mail
278 278
 			'Embedly/' => new props('start', $fn['feed']),
279 279
 			'PayPal IPN' => new props('exact', $fn['feed']),
280
-			'Pleroma' => new props('start', fn (string $value) : array => [ // mastodon
280
+			'Pleroma' => new props('start', fn (string $value) : array => [// mastodon
281 281
 				'type' => 'robot',
282 282
 				'category' => 'feed',
283 283
 				'app' => 'Mastodon',
284 284
 				'appname' => 'Pleroma',
285 285
 				'appversion' => \mb_substr($value, 8)
286 286
 			]),
287
-			'Outlook-Android/' => new props('start', fn (string $value) : array => [ // mastodon
287
+			'Outlook-Android/' => new props('start', fn (string $value) : array => [// mastodon
288 288
 				'type' => 'robot',
289 289
 				'category' => 'feed',
290 290
 				'app' => 'Outlook',
@@ -292,13 +292,13 @@  discard block
 block discarded – undo
292 292
 				'platform' => 'Android',
293 293
 				'appversion' => \mb_substr($value, 16)
294 294
 			]),
295
-			'Outlook-iOS/' => new props('start', fn (string $value, int $i, array $tokens) : array => [ // mastodon
295
+			'Outlook-iOS/' => new props('start', fn (string $value, int $i, array $tokens) : array => [// mastodon
296 296
 				'type' => 'robot',
297 297
 				'category' => 'feed',
298 298
 				'app' => 'Outlook',
299 299
 				'appname' => 'Outlook-iOS',
300 300
 				'platform' => 'iOS',
301
-				'appversion' => $tokens[$i+1] ?? \mb_substr($value, 12)
301
+				'appversion' => $tokens[$i + 1] ?? \mb_substr($value, 12)
302 302
 			]),
303 303
 			'OutlookMobileCloudService-Autodetect/' => new props('start', fn (string $value) : array => [
304 304
 				'type' => 'robot',
@@ -307,11 +307,11 @@  discard block
 block discarded – undo
307 307
 				'appname' => 'OutlookMobileCloudService-Autodetect',
308 308
 				'appversion' => \mb_substr($value, 37)
309 309
 			]),
310
-			'HubSpot Connect ' => new props('start', function (string $value, int $i, array $tokens) : array {
310
+			'HubSpot Connect ' => new props('start', function(string $value, int $i, array $tokens) : array {
311 311
 				$app = 'HubSpot Connect';
312 312
 				for ($n = $i; $n < \count($tokens); $n++) {
313 313
 					if (\str_starts_with($tokens[$n], 'namespace: ')) {
314
-						$app = \mb_substr($tokens[$n], 11).' - '.$tokens[$n+1];
314
+						$app = \mb_substr($tokens[$n], 11).' - '.$tokens[$n + 1];
315 315
 						break;
316 316
 					}
317 317
 				}
@@ -341,8 +341,8 @@  discard block
 block discarded – undo
341 341
 			'GoogleDocs' => new props('exact', fn (string $value, int $i, array $tokens) : array => [
342 342
 				'type' => 'robot',
343 343
 				'category' => 'feed',
344
-				'app' => 'Google Docs ('.\mb_convert_case(\str_ireplace('apps-', '', $tokens[$i+1]), MB_CASE_TITLE).')',
345
-				'appname' => $value.'; '.$tokens[$i+1]
344
+				'app' => 'Google Docs ('.\mb_convert_case(\str_ireplace('apps-', '', $tokens[$i + 1]), MB_CASE_TITLE).')',
345
+				'appname' => $value.'; '.$tokens[$i + 1]
346 346
 			]),
347 347
 			'Google-Lens' => new props('exact', $fn['feed']),
348 348
 			'ManicTime/' => new props('start', $fn['feed']),
Please login to merge, or discard this patch.
src/mappings/frameworks.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
 class frameworks {
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
 				'framework' => 'Alamofire',
27 27
 				'frameworkversion' => \explode('/', $value, 3)[1]
28 28
 			]),
29
-			'.NET CLR ' => new props('start', function (string $value, int $i, array $tokens) : array {
29
+			'.NET CLR ' => new props('start', function(string $value, int $i, array $tokens) : array {
30 30
 
31 31
 				// find latest version as often specifdies many versions
32 32
 				$levels = [];
Please login to merge, or discard this patch.