Repository navigation
Fix PHPStan error when unpacking mapped sources in make-json - #508
Conversation
Only unpack mapped sources that are actually arrays. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HsH4o5pKmm1Qd5cqwAm7vB
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (1)
Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 1 remain after this review. 📝 WalkthroughWalkthrough
ChangesReference Mapping
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix Suggested reviewers: Merge Risk: ⚪ Minimal · up to Valid mappings remain intact, while invalid values are skipped before unpacking. No material merge risk remains. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Fixes the PHPStan job failing on
main(run):In
reference_map(), the mapped values come from aarray<string, mixed>map, soarray_push( $references, ...$sources )could be handed a non-iterable. The loop previously only skippednull; it now skips anything that isn't an array, which still covers thenullcase.Verified locally with PHPStan 2.3.0:
composer phpstanreports no errors;composer phpunitpasses (62 tests).🤖 Generated with Claude Code
https://claude.ai/code/session_01HsH4o5pKmm1Qd5cqwAm7vB
Generated by Claude Code
Summary by CodeRabbit