Generic/ArbitraryParenthesesSpacing: improve sniff code coverage #174
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.
Description
This PR improves the code coverage for the Generic/ArbitraryParenthesesSpacing sniff.
There was just one block of defensive code to protect against a parse error that was not exercised by the tests. I followed the instructions on #143 for creating parse error tests.
I also added the match expression to one of the test case files. The sniff was already handling it properly, but I thought it would be useful anyway to ensure it continues to handle it properly in the future.
Code coverage for the Generic/ArbitraryParenthesesSpacing sniff before this PR:
https://coveralls.io/builds/64633852/source?filename=src%2FStandards%2FGeneric%2FSniffs%2FWhiteSpace%2FArbitraryParenthesesSpacingSniff.php
And after this PR:
https://coveralls.io/builds/64658984/source?filename=src%2FStandards%2FGeneric%2FSniffs%2FWhiteSpace%2FArbitraryParenthesesSpacingSniff.php
Related issues/external references
Part of #146
Types of changes
PR checklist