[Config] Move 3 rules from coding style set to their proper sets - #8266
Merged
Conversation
- RemoveFinalFromConstRector -> dead code set (easy picks) - ExplicitPublicClassMethodRector -> php 5.3 set - TernaryConditionVariableAssignmentRector -> code quality set
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
These 3 rules are not coding style, but belong to other sets:
1)
RemoveFinalFromConstRector→ dead code setThe
finalon a constant of afinalclass is dead noise:final class SomeClass { - final public const NAME = 'value'; + public const NAME = 'value'; }Placed in the "easy picks" group, as it removes a redundant keyword only.
2)
ExplicitPublicClassMethodRector→ php 5.3 setExplicit visibility is a PHP 5 upgrade step, same family as
VarToPublicPropertyRector:class SomeClass { - function run() + public function run() { } }3)
TernaryConditionVariableAssignmentRector→ code quality setNot a style choice, but a simplification, next to the other ternary rules:
function ternary($value) { - $value ? $a = 1 : $a = 0; + $a = $value ? 1 : 0; }The rule classes keep their current namespace, only the set registration moves. The
SetRectorsResolverTestcount is bumped, as the php 5.3 set has one more rule now.