JayBizzle / Crawler-Detect

🕷 CrawlerDetect is a PHP class for detecting bots/crawlers/spiders via the user agent
https://crawlerdetect.io
MIT License
1.96k stars 255 forks source link

Fixed user agent type annotations. #399

Closed Bilge closed 4 years ago

Bilge commented 4 years ago

It seems pretty clear that the type of CrawlerDetect::userAgent is string|null throughout this file. However, in some places it is typed as just null and in others it is typed as just string, when in fact, both are possible in all contexts. Moreover, the type initialization to null is redundant because all fields are null by default.

MaxGiting commented 4 years ago

Thank you