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

SingleLineArrayWhitespaceSniff: Fix spacing around brackets #864

Merged
merged 2 commits into from
Jan 23, 2020
Merged

SingleLineArrayWhitespaceSniff: Fix spacing around brackets #864

merged 2 commits into from
Jan 23, 2020

Conversation

mcaskill
Copy link
Contributor

  1. Fixed support for customizing spacesAroundBrackets from XML; normalizes property value to integer.
  2. Added SpaceInEmptyArray sniff to collapse any whitespace in an empty array declaration.

@mcaskill
Copy link
Contributor Author

Thanks for your review. I apologize for the CI failures, Phing is not running correctly on my machine. I've had to edit the paths of various files in the bin/ directory to point to their correct locations but stuff like PHPCS are not reporting issues.

@kukulich
Copy link
Contributor

@mcaskill If you can squash the fix commits to the first two then I can merge it from my mobile phone :)

Normalize `$spacesAroundBrackets` as integer from new method `getSpacesAroundBrackets()`.
Replicated "Squiz.Arrays.ArrayDeclaration.SpaceInEmptyArray" to ensure empty array declaration must have no space between the brackets.

This also prevents any required spaces around array brackets to ignore empty array declarations.
@kukulich kukulich merged commit b54110e into slevomat:master Jan 23, 2020
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.

None yet

2 participants