Test uncovered code paths to reach 100% line coverage#298
Conversation
|
@coderabbitai full review |
✅ Action performedFull review finished. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #298 +/- ##
========================================
Coverage 0.00% 0.00%
+ Complexity 330 328 -2
========================================
Files 49 49
Lines 910 903 -7
========================================
+ Misses 910 903 -7 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
📝 WalkthroughWalkthroughThis pull request adds code coverage annotations to middleware factories and expands test coverage across message handling, envelopes, failure validation, and queue configuration scenarios. The middleware factory changes mark unreachable exception paths for static analysis while excluding them from code coverage metrics. The test additions validate edge cases in message ID logging, envelope metadata, validation logic, and command behavior. ChangesCode Quality and Test Coverage
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 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 |
# Conflicts: # tests/Unit/Message/EnvelopeTest.php
What does this PR do?
Adds tests for previously uncovered code paths and removes the unreachable defensive
throwbranches in the middleware factories, bringingsrccoverage to 100%.Per review: instead of marking those branches with
@codeCoverageIgnore, the cause is removed.MiddlewareFactory::create()already returnsT, so theinstanceofchecks inConsumeMiddlewareFactory,FailureMiddlewareFactoryandPushMiddlewareFactorywere redundant and dropped. The finalthrowincreate()is gone too:string/arrayare now handled separately from thecallablebranch, so every path is reachable and typed. Behavior is unchanged - only dead code is removed.Summary by CodeRabbit
Tests
Chores