Fix newly reported PHPStan errors - #341
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughChangesDownload type handling
Estimated code review effort: 1 (Trivial) | ~5 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
📝 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 |
There was a problem hiding this comment.
Pull request overview
This PR updates the Core_Command implementation to resolve newly reported PHPStan type issues, primarily by making variable types explicit where WP-CLI input parsing and API responses can be nullable or mixed.
Changes:
- Casts
array_shift( $args )and$assoc_args['version']tostringto satisfy static analysis expectations. - Adds an explicit array-shape assertion for the
$offerreturned from WordPress.org APIs before indexing. - Updates
cleanup_extra_files()PHPDoc to reflect that version parameters may benull.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Summary by CodeRabbit