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

Continue project cleanup #183

Merged
merged 12 commits into from
Jan 12, 2025
Merged

Continue project cleanup #183

merged 12 commits into from
Jan 12, 2025

Conversation

lkrms
Copy link
Owner

@lkrms lkrms commented Jan 9, 2025

No description provided.

- Use declaration data to simplify one-line DocBlock handling in
  `NormaliseComments`
- Check for braces before calling `isMatchOpenBrace()` to improve
  efficiency of `IndexSpacing`
- Fix `StandardSpacing` issue where only the last constructor in the
  document with a promoted parameter is formatted correctly
- Fix issue where newlines are not suppressed inside parentheses in DNF
  types
Copy link

codecov bot commented Jan 9, 2025

Codecov Report

Attention: Patch coverage is 94.42424% with 46 lines in your changes missing coverage. Please review.

Project coverage is 96.06%. Comparing base (f75c1dc) to head (6b86e4d).
Report is 14 commits behind head on main.

✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
src/Formatter.php 88.18% 39 Missing ⚠️
src/Token.php 95.95% 4 Missing ⚠️
src/Parser.php 98.91% 2 Missing ⚠️
src/Renderer.php 85.71% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main     #183      +/-   ##
============================================
+ Coverage     95.84%   96.06%   +0.22%     
+ Complexity     2799     2791       -8     
============================================
  Files            67       67              
  Lines          7140     7109      -31     
============================================
- Hits           6843     6829      -14     
+ Misses          297      280      -17     

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

lkrms added 11 commits January 10, 2025 19:56
- Remove `isDoubleArrowAfterFn()`
- Allow `adjacent()` to return tokens at the end of statements unless
  they are statement delimiters
- Simplify `prevReal()` and `nextReal()` and replicate in
  `doRemoveWhitespace()`, `PreserveNewlines` and `EssentialSpacing` to
  improve performance
- Refactor `hasNewlineAfterPrevCode()` and `hasNewlineBeforeNextCode()`
  for consistency
- Fix improper use of `hasNewlineAfterPrevCode()` in
  `StandardIndentation`
- Remove `$AlignChainAfterNewline`
- Derive `$NewlineBeforeFnDoubleArrow` from `$Psr12` and don't allow it
  to be set separately
- Preserve comment type when truncating for comparison
- Add `TokenCollection::from()`
@lkrms lkrms changed the title Continue rule cleanup Continue project cleanup Jan 12, 2025
@lkrms lkrms merged commit 1aae6b5 into main Jan 12, 2025
26 of 27 checks passed
@lkrms lkrms deleted the cleanup branch January 12, 2025 05:29
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