-
-
Notifications
You must be signed in to change notification settings - Fork 0
Fixed snake_case not being updated in the docblocks. #8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Caution Review failedThe pull request is closed. 📝 WalkthroughWalkthroughThe changes enhance the ParameterSnakeCaseSniff by adding docblock synchronization capabilities. Two private helper methods locate a function's docblock and update Changes
Sequence DiagramsequenceDiagram
participant CodeSniffer as PHP_CodeSniffer
participant Sniff as ParameterSnakeCaseSniff
participant Helper1 as findFunctionDocblock()
participant Helper2 as fixDocblockParam()
participant Tokens as Token Stream
CodeSniffer->>Sniff: Process parameter violation
activate Sniff
Sniff->>Sniff: Fix parameter name
Sniff->>Helper2: fixDocblockParam(oldName, newName)
activate Helper2
Helper2->>Helper1: findFunctionDocblock()
activate Helper1
Helper1->>Tokens: Scan backwards for docblock
Tokens-->>Helper1: Docblock position or FALSE
deactivate Helper1
alt Docblock found
Helper2->>Tokens: Locate `@param` tags
Tokens-->>Helper2: `@param` tag positions
Helper2->>Tokens: Update matching param name
Tokens-->>Helper2: Success
else No docblock
Helper2->>Helper2: Exit early
end
deactivate Helper2
Sniff-->>CodeSniffer: Fix complete
deactivate Sniff
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~22 minutes
Possibly related PRs
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: ASSERTIVE Plan: Pro 📒 Files selected for processing (4)
Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #8 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 6 6
Lines 370 387 +17
=========================================
+ Hits 370 387 +17 ☔ View full report in Codecov by Sentry. |
Summary by CodeRabbit
New Features
Tests
✏️ Tip: You can customize this high-level summary in your review settings.