Update sniff to enforce more early returns#2818
Conversation
📝 WalkthroughWalkthroughThree files are refactored to implement an early-return guard pattern instead of traditional if-block logic. Permission checks and error handling now return early when conditions are unmet. A PHPCS sniff's statement counter is updated to count all semicolons recursively rather than only at the immediate nesting level. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧹 Recent nitpick comments
📜 Recent review detailsConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro 📒 Files selected for processing (3)
🧰 Additional context used📓 Path-based instructions (1)**/*.php⚙️ CodeRabbit configuration file
Files:
🧬 Code graph analysis (1)classes/controllers/FrmFormsController.php (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (9)
🔇 Additional comments (3)
✏️ Tip: You can disable this entire section by setting 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❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2818 +/- ##
============================================
- Coverage 27.09% 27.09% -0.01%
Complexity 8840 8840
============================================
Files 145 145
Lines 29760 29758 -2
============================================
- Hits 8063 8062 -1
+ Misses 21697 21696 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This wasn't counting lines inside of conditions, where this is most important since there is more indentation.