Fix indent for closing function parenthesis #3758
Closed
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.
I'm having trouble writing a test case for this. This seems to mostly be because changing this line alone doesn't break any existing tests, and I can't find a test case that breaks like the live example does because it seems to be an interaction between
PEAR.Functions.FunctionCallSignature
andGeneric.WhiteSpace.ScopeIndent
/Squiz.WhiteSpace.ScopeClosingBrace
which causes the issue.Long explanation with a real example of the problem
Here's a code snippet that I'm working with:
The first pass through the fixer says:
Which gives us:
This is the step which I'm fixing in this pull request. The closing parenthesis of the function call is misaligned by one indentation step. (Found 12, expected 8.)
The second pass through the fixer says:
Which gives us:
The third pass through the fixer says:
Which gives us:
And then the fixer declared victory. However, it's left the indentation of the closing function call vertically lined up differently from what I expect.
I'm expecting:
Hopefully the change in this pull request fixes the problem, but I'm having trouble verifying that it actually does. Please can I have some help?