Repository navigation
Blink parity: collapse blank lines between call/parameter arguments; gate to 0.4% - #137
Merged
Merged
Conversation
php-cs-fixer's MethodArgumentSpace collapses a blank line between the arguments of a call or declaration (including promoted params with standalone attributes), but a blank line between array items is kept. reflowParen preserved blanks for every context; it now collapses them for call/declaration/parameter parens and keeps them only for array literals.
The call/parameter blank-line collapse removed a blank line that precedes a comment annotating the next argument; php-cs-fixer keeps it. Preserve the blank line when the next token after the comma is a non-attribute comment.
TomasVotruba
enabled auto-merge (squash)
October 5, 2026 09:49
TomasVotruba
disabled auto-merge
October 5, 2026 09:51
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Collapses stray blank lines between function/call arguments. Measured drop: 21 to 15 differing files of 4527 (0.33%), 6 files fixed with zero regressions.
The issue
Pristine files had blank lines between arguments; ECS removes them, blink preserved them. Most visible with promoted constructor params carrying standalone attributes:
Root cause and fix
Verified against real ECS (applied-checkers:
MethodArgumentSpaceFixer): ECS collapses blank lines between call and declaration/parameter arguments (plain params, attributed promoted params, and plain call args), but preserves blank lines between array-literal items. blink's sharedreflowParenpreserved blanks in every context.A
collapseBlanksflag is threaded throughreflowParen→reflowAfterComma→argNLAfterComma. Call/declaration/parameter callers collapse; array callers (ArrayListItemNewline,StandaloneLineInMultilineArray) preserve. This keeps the array-blank behavior that a prior change showed must be preserved.Gate
MAX_DIFF_PERCENTlowered 0.5 to 0.4; actual is 0.33% (15 of 4527).Fixed the 3 attribute-param files plus 3 more with the same blank-line issue (ConsoleErrorListener, EmailSubscriberTest, WebhookSubscriberTest). Unit tests cover attributed-param collapse, plain call-arg collapse, and array-item blank preservation. Full blink suite, go vet, golangci-lint green; strict rector-src 1:1 gate stays 0-diff.