Skip to content

Conversation

gharlan
Copy link
Member

@gharlan gharlan commented Jul 8, 2025

fixes #8027

$endIndex = $tokens->findBlockEnd(Tokens::BLOCK_TYPE_ARRAY_SQUARE_BRACE, $endIndex);

continue;
}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is difficult to understand the internals of StatementIndentationFixer. So I'm not sure if the fix is correct at this place.
But tests seem to be green.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is, great work finding the place 👍🏼

@coveralls
Copy link

Coverage Status

coverage: 94.806% (+0.001%) from 94.805%
when pulling 08a0e86 on gharlan:statement-indentation-const-array
into 578ea7a on PHP-CS-Fixer:master.

@gharlan gharlan changed the title fix: StatementIndentationFixer - multi constant statement containing array fix: StatementIndentationFixer - multi constant statement containing array Jul 8, 2025
@kubawerlos kubawerlos merged commit 97de337 into PHP-CS-Fixer:master Jul 8, 2025
29 checks passed
@gharlan gharlan deleted the statement-indentation-const-array branch July 8, 2025 20:47
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.

statement_indentation and arrays defined in a multiline const breaks indentation
3 participants