| @@ -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 crawlers { | 
| @@ -217,7 +217,7 @@ discard block | ||
| 217 | 217 | 'category' => 'feed' | 
| 218 | 218 | ] | 
| 219 | 219 | )), | 
| 220 | -			'crawler' => function (string $value) : array { | |
| 220 | +			'crawler' => function(string $value) : array { | |
| 221 | 221 | return self::getApp($value, ['category' => 'crawler']); | 
| 222 | 222 | }, | 
| 223 | 223 | 'monitor' => fn (string $value) : array => self::getApp($value, ['category' => 'monitor']), | 
| @@ -229,7 +229,7 @@ discard block | ||
| 229 | 229 | 'type' => 'robot', | 
| 230 | 230 | 'categpry' => 'scraper' | 
| 231 | 231 | ]), | 
| 232 | -			'Moblie' => new props('exact', [ // some samsung devices mispelt it | |
| 232 | +			'Moblie' => new props('exact', [// some samsung devices mispelt it | |
| 233 | 233 | 'type' => 'robot', | 
| 234 | 234 | 'category' => 'scraper' | 
| 235 | 235 | ]), | 
| @@ -254,7 +254,7 @@ discard block | ||
| 254 | 254 |  			'Siteimprove.com' => new props('any', $fn['crawler']), | 
| 255 | 255 |  			'SEOlyt/' => new props('any', $fn['crawler']), | 
| 256 | 256 |  			'CyotekWebCopy' => new props('start', $fn['scraper']), | 
| 257 | -			'Yandex' => new props('start', function (string $value) : array { | |
| 257 | +			'Yandex' => new props('start', function(string $value) : array { | |
| 258 | 258 |  				$parts = \explode('/', $value, 3); | 
| 259 | 259 | return [ | 
| 260 | 260 | 'type' => 'robot', | 
| @@ -265,7 +265,7 @@ discard block | ||
| 265 | 265 | ]; | 
| 266 | 266 | }), | 
| 267 | 267 |  			'Google Page Speed Insights' => new props('exact', $fn['validator']), | 
| 268 | -			'Qwantify' => new props('start', function (string $value) : array { | |
| 268 | +			'Qwantify' => new props('start', function(string $value) : array { | |
| 269 | 269 |  				$parts = \explode('/', $value, 3); | 
| 270 | 270 | return [ | 
| 271 | 271 | 'type' => 'robot', | 
| @@ -316,7 +316,7 @@ discard block | ||
| 316 | 316 |  			'HostTracker/' => new props('start', $fn['monitor']), | 
| 317 | 317 | 'NCSC Web Check [email protected]' => new props('exact', $fn['monitor']), | 
| 318 | 318 | 'Enhanced WebCheck [email protected]' => new props('exact', $fn['monitor']), | 
| 319 | -			'Pingdom.com' => new props('start', function (string $value) : array { | |
| 319 | +			'Pingdom.com' => new props('start', function(string $value) : array { | |
| 320 | 320 |  				$version = \explode('_', \trim($value, '_')); | 
| 321 | 321 | return [ | 
| 322 | 322 | 'type' => 'robot', | 
| @@ -346,14 +346,14 @@ discard block | ||
| 346 | 346 |  			'Embedly/' => new props('start', $fn['feed']), | 
| 347 | 347 |  			'PayPal IPN' => new props('exact', $fn['feed']), | 
| 348 | 348 |  			'DropboxPreviewBot/' => new props('start', $fn['feed']), | 
| 349 | -			'Pleroma' => new props('start', fn (string $value) : array => [ // mastodon | |
| 349 | +			'Pleroma' => new props('start', fn (string $value) : array => [// mastodon | |
| 350 | 350 | 'type' => 'robot', | 
| 351 | 351 | 'category' => 'feed', | 
| 352 | 352 | 'app' => 'Mastodon', | 
| 353 | 353 | 'appname' => 'Pleroma', | 
| 354 | 354 | 'appversion' => \mb_substr($value, 8) | 
| 355 | 355 | ]), | 
| 356 | -			'Outlook-Android/' => new props('start', fn (string $value) : array => [ // mastodon | |
| 356 | +			'Outlook-Android/' => new props('start', fn (string $value) : array => [// mastodon | |
| 357 | 357 | 'type' => 'robot', | 
| 358 | 358 | 'category' => 'feed', | 
| 359 | 359 | 'app' => 'Outlook', | 
| @@ -361,13 +361,13 @@ discard block | ||
| 361 | 361 | 'platform' => 'Android', | 
| 362 | 362 | 'appversion' => \mb_substr($value, 16) | 
| 363 | 363 | ]), | 
| 364 | -			'Outlook-iOS/' => new props('start', fn (string $value, int $i, array $tokens) : array => [ // mastodon | |
| 364 | +			'Outlook-iOS/' => new props('start', fn (string $value, int $i, array $tokens) : array => [// mastodon | |
| 365 | 365 | 'type' => 'robot', | 
| 366 | 366 | 'category' => 'feed', | 
| 367 | 367 | 'app' => 'Outlook', | 
| 368 | 368 | 'appname' => 'Outlook-iOS', | 
| 369 | 369 | 'platform' => 'iOS', | 
| 370 | - 'appversion' => $tokens[$i+1] ?? \mb_substr($value, 12) | |
| 370 | + 'appversion' => $tokens[$i + 1] ?? \mb_substr($value, 12) | |
| 371 | 371 | ]), | 
| 372 | 372 |  			'OutlookMobileCloudService-Autodetect/' => new props('start', fn (string $value) : array => [ | 
| 373 | 373 | 'type' => 'robot', | 
| @@ -376,11 +376,11 @@ discard block | ||
| 376 | 376 | 'appname' => 'OutlookMobileCloudService-Autodetect', | 
| 377 | 377 | 'appversion' => \mb_substr($value, 37) | 
| 378 | 378 | ]), | 
| 379 | -			'HubSpot Connect ' => new props('start', function (string $value, int $i, array $tokens) : array { | |
| 379 | +			'HubSpot Connect ' => new props('start', function(string $value, int $i, array $tokens) : array { | |
| 380 | 380 | $app = 'HubSpot Connect'; | 
| 381 | 381 |  				for ($n = $i; $n < \count($tokens); $n++) { | 
| 382 | 382 |  					if (\str_starts_with($tokens[$n], 'namespace: ')) { | 
| 383 | - $app = \mb_substr($tokens[$n], 11).' - '.$tokens[$n+1]; | |
| 383 | + $app = \mb_substr($tokens[$n], 11).' - '.$tokens[$n + 1]; | |
| 384 | 384 | break; | 
| 385 | 385 | } | 
| 386 | 386 | } | 
| @@ -411,7 +411,7 @@ discard block | ||
| 411 | 411 | 'type' => 'robot', | 
| 412 | 412 | 'category' => 'feed', | 
| 413 | 413 | 'app' => 'Google Docs', | 
| 414 | - 'appname' => $value.'; '.$tokens[$i+1] | |
| 414 | + 'appname' => $value.'; '.$tokens[$i + 1] | |
| 415 | 415 | ]), | 
| 416 | 416 |  			'Google-Lens' => new props('exact', $fn['feed']), | 
| 417 | 417 |  			'ManicTime/' => new props('start', $fn['feed']), |