@@ -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 { |
@@ -140,7 +140,7 @@ discard block |
||
| 140 | 140 | 'category' => 'feed' |
| 141 | 141 | ] |
| 142 | 142 | )), |
| 143 | - 'crawler' => function (string $value) : array { |
|
| 143 | + 'crawler' => function(string $value) : array { |
|
| 144 | 144 | $parts = \explode('/', $value, 2); |
| 145 | 145 | $map = [ |
| 146 | 146 | 'baiduspider' => 'search', |
@@ -172,7 +172,7 @@ discard block |
||
| 172 | 172 | 'Siteimprove.com' => new props('any', $fn['crawler']), |
| 173 | 173 | 'CyotekWebCopy' => new props('start', $fn['scraper']), |
| 174 | 174 | 'Google Page Speed Insights' => new props('exact', $fn['validator']), |
| 175 | - 'Qwantify' => new props('start', function (string $value) : array { |
|
| 175 | + 'Qwantify' => new props('start', function(string $value) : array { |
|
| 176 | 176 | $parts = \explode('/', $value, 3); |
| 177 | 177 | return [ |
| 178 | 178 | 'type' => 'robot', |
@@ -214,7 +214,7 @@ discard block |
||
| 214 | 214 | 'Uptime/' => new props('start', $fn['monitor']), |
| 215 | 215 | 'HostTracker/' => new props('start', $fn['monitor']), |
| 216 | 216 | 'NCSC Web Check [email protected]' => new props('exact', $fn['monitor']), |
| 217 | - 'Pingdom.com' => new props('start', function (string $value) : array { |
|
| 217 | + 'Pingdom.com' => new props('start', function(string $value) : array { |
|
| 218 | 218 | $version = \explode('_', \trim($value, '_')); |
| 219 | 219 | return [ |
| 220 | 220 | 'type' => 'robot', |
@@ -240,14 +240,14 @@ discard block |
||
| 240 | 240 | 'MicrosoftPreview/' => new props('start', $fn['feed']), |
| 241 | 241 | 'YahooMailProxy' => new props('exact', $fn['feed']), |
| 242 | 242 | 'PhxBot/' => new props('start', $fn['feed']), // proton mail |
| 243 | - 'Pleroma' => new props('start', fn (string $value) : array => [ // mastodon |
|
| 243 | + 'Pleroma' => new props('start', fn (string $value) : array => [// mastodon |
|
| 244 | 244 | 'type' => 'robot', |
| 245 | 245 | 'category' => 'feed', |
| 246 | 246 | 'app' => 'Mastodon', |
| 247 | 247 | 'appname' => 'Pleroma', |
| 248 | 248 | 'appversion' => \mb_substr($value, 8) |
| 249 | 249 | ]), |
| 250 | - 'Outlook-Android/' => new props('start', fn (string $value) : array => [ // mastodon |
|
| 250 | + 'Outlook-Android/' => new props('start', fn (string $value) : array => [// mastodon |
|
| 251 | 251 | 'type' => 'robot', |
| 252 | 252 | 'category' => 'feed', |
| 253 | 253 | 'app' => 'Outlook', |
@@ -255,15 +255,15 @@ discard block |
||
| 255 | 255 | 'platform' => 'Android', |
| 256 | 256 | 'appversion' => \mb_substr($value, 16) |
| 257 | 257 | ]), |
| 258 | - 'Outlook-iOS/' => new props('start', fn (string $value, int $i, array $tokens) : array => [ // mastodon |
|
| 258 | + 'Outlook-iOS/' => new props('start', fn (string $value, int $i, array $tokens) : array => [// mastodon |
|
| 259 | 259 | 'type' => 'robot', |
| 260 | 260 | 'category' => 'feed', |
| 261 | 261 | 'app' => 'Outlook', |
| 262 | 262 | 'appname' => 'Outlook-iOS', |
| 263 | 263 | 'platform' => 'iOS', |
| 264 | - 'appversion' => $tokens[$i+1] ?? \mb_substr($value, 12) |
|
| 264 | + 'appversion' => $tokens[$i + 1] ?? \mb_substr($value, 12) |
|
| 265 | 265 | ]), |
| 266 | - 'OutlookMobileCloudService-Autodetect/' => new props('start', fn (string $value) : array => [ // mastodon |
|
| 266 | + 'OutlookMobileCloudService-Autodetect/' => new props('start', fn (string $value) : array => [// mastodon |
|
| 267 | 267 | 'type' => 'robot', |
| 268 | 268 | 'category' => 'feed', |
| 269 | 269 | 'app' => 'Outlook', |