New Universal.OOStructures.AlphabeticExtendsImplements
sniff
#55
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.
New sniff to verify that the names used in a class "implements" statement or an interface "extends" statement are listed in alphabetic order.
Notes:
orderby
property to determine the sort order to use for the statement.If all names used are unqualified, the sort order won't make a difference.
However, if one or more of the names are partially or fully qualified, the chosen sort order will determine how the sorting between unqualified, partially and fully qualified names is handled.
The sniff supports two sort order options:
In both cases, the sorting will be done using natural sort, case-insensitive.
ImplementsWrongOrder
- for "class implements" statements.ImplementsWrongOrderWithComments
- for "class implements" statements interlaced with comments. These will not be auto-fixed.ExtendsWrongOrder
- for "interface extends" statements.ExtendsWrongOrderWithComments
- for "interface extends" statements interlaced with comments. These will not be auto-fixed.implements
/extends
statement will not be maintained.The fixer will separate each name with a comma and one space.
If alternative formatting is desired, a sniff which will check and fix the formatting should be added to the ruleset.
Includes fixer.
Includes unit tests.
Includes documentation.
Includes metrics.
Fixes #54