Change protected methods to public in SQL.php#95
Conversation
WalkthroughFive protected methods in the Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ 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 |
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (1)
src/Audit/Adapter/SQL.php (1)
24-176: Consider documenting the public API design rationale.The selective exposure of methods (making collection-level getters public while keeping singular/implementation methods protected) suggests a thoughtful design. Consider adding class-level documentation explaining:
- When external consumers should use these public methods
- The intended use cases for schema inspection
- Why certain methods remain protected (implementation details vs. public API)
This will help maintainers understand the design intent and prevent unintended future changes.
📜 Review details
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
src/Audit/Adapter/SQL.php(5 hunks)
🔇 Additional comments (2)
src/Audit/Adapter/SQL.php (2)
142-166: Methods are safe to expose publicly - no subclass overrides exist.These methods are implementation-specific to the SQL adapter and are not part of the abstract
Adapterbase class. No subclasses override these methods, so making them public poses no compatibility concerns.
24-27: Schema methods are now part of the public API.Making
getCollectionName(),getAttributes(),getAttributeDocuments(),getIndexes(), andgetIndexDocuments()public expands the API surface to allow external inspection of audit schema structure. Concrete subclasses do not override these methods, so the visibility change is compatible with existing implementations.
|
closed in favor of |
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.