The PHPStan fix inadvertently broke link extraction by using is_int()
on $pageId, which failed when lastInsertId() or fetchColumn() returned
a string instead of an int.
Changes:
- Convert $pageId to int explicitly after fetching
- Use $pageId > 0 instead of is_int($pageId) for validation
- Handle both 0 and '0' cases when fetching manually
This ensures link extraction works again while maintaining type safety.
Tests pass, PHPStan clean.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Add PHPUnit 11.0 testing framework
- Create unit tests for Database and Crawler classes
- Create integration tests for Crawler
- Add phpunit.xml configuration
- Change UI background color to rose
- All 9 tests passing
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>