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

HeredocIndentationFixer - remove whitespace in empty lines #4548

Merged
merged 1 commit into from Oct 8, 2019

Conversation

gharlan
Copy link
Contributor

@gharlan gharlan commented Sep 7, 2019

replaces #4422

$content = Preg::replace('/(?<=\v)'.$currentIndent.$regexEnd.'/', $indent, $tokens[$index]->getContent());
$content = $tokens[$index]->getContent();

if ($currentIndent) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Aren't we usually explicit? (Also in the ternary on line 117 and the elseif on line 135)

Copy link
Member

Choose a reason for hiding this comment

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

Indeed, we prefer explicit comparisons.

@SpacePossum SpacePossum added the RTM Ready To Merge label Oct 8, 2019
@SpacePossum SpacePossum added this to the 2.15.4 milestone Oct 8, 2019
@SpacePossum
Copy link
Contributor

Thank you @gharlan.

SpacePossum added a commit that referenced this pull request Oct 8, 2019
…(gharlan)

This PR was merged into the 2.15 branch.

Discussion
----------

HeredocIndentationFixer - remove whitespace in empty lines

replaces #4422

Commits
-------

8768cbc HeredocIndentationFixer - remove whitespace in empty lines
@SpacePossum SpacePossum merged commit 8768cbc into PHP-CS-Fixer:2.15 Oct 8, 2019
@SpacePossum SpacePossum removed the RTM Ready To Merge label Oct 8, 2019
@gharlan gharlan deleted the heredoc-indentation branch October 8, 2019 09:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants