• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

JayBizzle / Crawler-Detect / #1974
100%

Build:
DEFAULT BRANCH: master
Ran 14 Apr 2026 07:26PM UTC
Jobs 1
Files 5
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

14 Apr 2026 07:25PM UTC coverage: 100.0%. Remained the same
#1974

push

web-flow
Fix bugs and harden tests (patch-safe) (#595)

* Improve code quality: fix bugs, add type safety, and harden tests

- Fix null concatenation deprecation in setUserAgent (PHP 8.1+)
- Fix MSIE exclusion pattern missing * quantifier
- Reset matches at top of isCrawler() for reliable state
- Add preg error handling in isCrawler()
- Make compileRegex() protected (internal API)
- Add return type declarations to all methods
- Add parameter type hints throughout
- Use setUp() in tests, fix property visibility/naming
- Fix typo in test method name (persit -> persist)
- Optimize collision test from O(n²) to O(n²/2)
- Add tests for regex validity and stored agent immutability

* Revert BC-breaking type hints and visibility change

Keeps the bug fixes and deprecation fix in isCrawler()/setUserAgent()
and the MSIE exclusion pattern fix, but drops the param/return type
declarations and the compileRegex() visibility change so this can ship
as a patch release.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* Add test for preg_match error branch in isCrawler()

Forces preg_match to return PREG_BACKTRACK_LIMIT_ERROR by setting
pcre.backtrack_limit to 1, covering the previously untested error path.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

12 of 12 new or added lines in 1 file covered. (100.0%)

40 of 40 relevant lines covered (100.0%)

14.03 hits per line

Jobs
ID Job ID Ran Files Coverage
1 #1974.1 14 Apr 2026 07:26PM UTC 5
100.0
Source Files on build #1974
  • Tree
  • List 5
  • Changed 1
  • Source Changed 0
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 27b13425 on github
  • Prev Build on master
  • Next Build on master
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc