feat(api): centralize typed structural payload differences and add immutable fluent toolbar item and panel construction while preserving diagnostic values, constructors, and serialized payloads. - #35
Conversation
…mutable fluent toolbar item and panel construction while preserving diagnostic values, constructors, and serialized payloads.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #35 +/- ##
==========================================
Coverage 99.95% 99.95%
- Complexity 2018 2040 +22
==========================================
Files 155 156 +1
Lines 8054 8165 +111
==========================================
+ Hits 8050 8161 +111
Misses 4 4 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Team Run ID: 📒 Files selected for processing (9)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. 📜 Recent review details⏰ Context from checks skipped due to timeout. (3)
🧰 Additional context used🪛 PHPMD (2.15.0)src/Toolbar/ToolbarItem.php[warning] 90-90: Avoid variables with short names like $id. Configured minimum length is 3. (undefined) (ShortVariable) src/Comparison/PayloadDifference.php[error] 48-50: The method between uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. (undefined) (ElseExpression) tests/Toolbar/ToolbarPanelTest.php[error] 35-35: Avoid using static access to class '\PHPForge\Debug\Toolbar\ToolbarPanel' in method 'testCreateMatchesConstructorDefaults'. (undefined) (StaticAccess) [error] 131-137: The method testWithNavigationPreservesOriginalAndOtherFields uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. (undefined) (ElseExpression) tests/Comparison/PayloadDifferenceTest.php[warning] 22-139: The method payloads() has 118 lines of code. Current threshold is set to 100. Avoid really long methods. (undefined) (ExcessiveMethodLength) [error] 152-152: Avoid using static access to class '\PHPForge\Debug\Comparison\PayloadDifference' in method 'testBetweenPreservesTypedLeafSemantics'. (undefined) (StaticAccess) [error] 173-176: Avoid using static access to class '\PHPForge\Debug\Comparison\PayloadDifference' in method 'testResultRetainsOnlyCounters'. (undefined) (StaticAccess) src/Toolbar/ToolbarPanel.php[warning] 35-35: Avoid variables with short names like $id. Configured minimum length is 3. (undefined) (ShortVariable) tests/Toolbar/ToolbarItemTest.php[error] 24-24: Avoid using static access to class '\PHPForge\Debug\Toolbar\ToolbarItem' in method 'testCreateMatchesConstructorDefaults'. (undefined) (StaticAccess) [error] 83-89: The method testWithIconPreservesOriginalAndOtherFields uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. (undefined) (ElseExpression) [error] 127-133: The method testWithIdPreservesOriginalAndOtherFields uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. (undefined) (ElseExpression) [error] 172-178: The method testWithLabelPreservesOriginalAndOtherFields uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. (undefined) (ElseExpression) [error] 254-260: The method testWithTitlePreservesOriginalAndOtherFields uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. (undefined) (ElseExpression) [error] 299-305: The method testWithUrlPreservesOriginalAndOtherFields uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. (undefined) (ElseExpression) 🔇 Additional comments (5)
📝 SummarySummary by CodeRabbit
WalkthroughAdds ChangesAPI features
Estimated code review effort: 3 (Moderate) | ~25 minutes Merge Risk: ⚪ Minimal · up to This adds typed payload-difference counters and fluent immutable toolbar construction while preserving existing constructors and serialized payload behavior. The changed contracts are covered by focused tests, with no remaining merge-blocking risk identified. Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 62.16% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 37 functions across 7 files. (2 skipped: 2 unsupported.)
✨ Finishing Touches 💡 1📝 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 |
Pull Request