Skip to content
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

Clean up documentation and code #182

Merged
merged 21 commits into from
Jan 8, 2025
Merged

Clean up documentation and code #182

merged 21 commits into from
Jan 8, 2025

Conversation

lkrms
Copy link
Owner

@lkrms lkrms commented Jan 7, 2025

No description provided.

lkrms added 13 commits January 6, 2025 14:27
- Rename for compactness:
  - `INFORMAL_DOC_COMMENT` -> `C_DOC_COMMENT`
  - `STATEMENT_TERMINATOR` -> `TERMINATOR`
  - `TERNARY_OPERATOR` -> `TERNARY`
  - `NAMED_DECLARATION` -> `DECLARATION`
  - `OTHER_TERNARY_OPERATOR` -> `OTHER_TERNARY`
  - `STRING_CLOSED_BY` -> `END_STRING`
  - `CHAIN_OPENED_BY` -> `CHAIN`
  - `NAMED_DECLARATION_PARTS` -> `DECLARATION_PARTS`
  - `NAMED_DECLARATION_TYPE` -> `DECLARATION_TYPE`
- Add `OperatorExceptTernaryOrDelimiter`
- Replace `AltContinue` with `AltContinueOrEnd`
- Remove `OpenBracketOrAlt`, `CloseBracketOrAlt`,
  `AltContinueWithExpression`, `AltContinueWithNoExpression`,
  `IfElseIfOrElse`, `OperatorTernary` `ExpressionDelimiter`
- Rename other indexes for brevity or clarity
This will allow custom indexes like `WordPressTokenIndex` to be
decoupled from `TokenIndex` so new methods remain abstract until
explicitly implemented. Without this change, methods added to
`TokenIndex` are silently inherited by custom indexes, which may lead
to unstable behaviour.
- Extend `AbstractTokenIndex` from `WordPressTokenIndex`
- Make `TokenIndex` final
Copy link

codecov bot commented Jan 7, 2025

Codecov Report

Attention: Patch coverage is 99.28058% with 3 lines in your changes missing coverage. Please review.

Project coverage is 95.84%. Comparing base (953e41e) to head (f75c1dc).
Report is 23 commits behind head on main.

✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
src/Rule/Preset/Internal/WordPressTokenIndex.php 72.72% 3 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main     #182      +/-   ##
============================================
+ Coverage     95.53%   95.84%   +0.30%     
- Complexity     2791     2799       +8     
============================================
  Files            67       67              
  Lines          7106     7140      +34     
============================================
+ Hits           6789     6843      +54     
+ Misses          317      297      -20     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@lkrms lkrms force-pushed the cleanup branch 7 times, most recently from bfc1854 to c575c75 Compare January 8, 2025 03:58
lkrms added 5 commits January 8, 2025 17:33
- Fix issue where assignments in alternative syntax constructs are not
  aligned when `align-data` is enabled
- Fix issue where alignment is incorrectly applied to default value
  assignments in parameter lists with no leading newline when
  `align-data` is enabled
- Fix issue where alternative syntax constructs may not be indented
  correctly when `align-lists` is enabled
- Fix issue where blank lines may not be added before `yield` statements
  in alternative syntax constructs when `blank-before-return` is enabled
- Fix issue where blank lines before and after comments are incorrectly
  suppressed in alternative syntax constructs
@lkrms lkrms merged commit af5e85f into main Jan 8, 2025
27 checks passed
@lkrms lkrms deleted the cleanup branch January 8, 2025 06:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant