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

minor: SingleSpaceAroundConstructFixer - support space before as #7029

Merged
merged 3 commits into from
Jun 12, 2023

Conversation

paulbalandan
Copy link
Contributor

Closes #5155

@paulbalandan paulbalandan force-pushed the spaces-before-and-after-as branch 2 times, most recently from 2954f4e to 7ebb4f4 Compare June 6, 2023 05:26
@SpacePossum
Copy link
Contributor

Looking good.
Wondering, as 5155 is about foreach , does this fix also touch <?php use exception as bar; for example? Do we want to (I think so)? Maybe having some tests for this would be good.

Copy link
Contributor

@kubawerlos kubawerlos left a comment

Choose a reason for hiding this comment

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

Maybe some tests with meaningful token before as like:

foreach (range(0, 9)as$i) { echo $i; }
foreach (range(0, 9)as $i) { echo $i; }

but I won't insist on adding them.

@Wirone Wirone changed the title minor: SingleSpaceAroundConstructFixer - support space before as minor: SingleSpaceAroundConstructFixer - support space before as Jun 12, 2023
@Wirone Wirone merged commit 7fd9f7b into PHP-CS-Fixer:master Jun 12, 2023
14 checks passed
@Wirone
Copy link
Member

Wirone commented Jun 12, 2023

Thank you @paulbalandan 🍻

@paulbalandan paulbalandan deleted the spaces-before-and-after-as branch June 13, 2023 00:36
niklam pushed a commit to niklam/PHP-CS-Fixer that referenced this pull request Jun 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

foreach declaration SpacingBeforeAs and SpacingAfterAs expected 1 space after "as"
4 participants