Follow up on version drop/ remove some more code #369
Merged
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.
BackCompat\BCTokens: remove the tokenName() method
Follow up on #250 and #347.
PR #250 introduced a polyfill for the PHPCS native
Tokens::tokenName()
method as this method was only available in PHPCS 3.0.0 and higher.However, after the version drop, this method is no longer needed as the PHPCS native functionality can now be used in all cases.
This was missed in the version drop PR #347.
The method can be safely removed as it was never in a tagged release.
Note: as PHPCS itself does not have any tests for the native method, I'm keeping the associated test class and moving it to a separate
Xtra
directory for tests not directly related to PHPCSUtils. These tests should probably be pulled upstream at some point.Utils\Parentheses: minor code simplification
Utils\PassedParameters: minor code simplification
The "valid identifier" check was only in place to handle BC for PHPCS < 3.6.0 and should no longer be needed.
SplitImportUseStatementTest: minor tweak
Remove a line which was only added to the test case file for a PHPCS cross-version support issue, which was fixed in PHPCS 3.7.0, meaning that this line is no longer needed.
See #287 for more information.