rector/code-quality set
Rector’s code-quality set: the Pun lint rules its Rector rules map to, and nothing else.
[lint]
sets = ["rector/code-quality"]
A rule merged from several Rector rules runs only the rewrites of this set’s Rector rules, unless a preset also turns it on. Rector rules that are format rules in Pun run under [format] instead. Laravel, Pest, and PHPUnit rules also need their extension.
Rules (56)
| Rule | Rector rules | Status |
|---|---|---|
lint/classes/prefer-new-self |
NewStaticToNewSelfRector |
Ported |
lint/classes/prefer-self-in-final |
ConvertStaticToSelfRector |
Ported |
lint/complexity/no-and-assignment |
AndAssignsToSeparateLinesRector |
Ported |
lint/complexity/no-compact |
CompactToVariablesRector |
Ported |
lint/complexity/no-concat-assign-new-item |
NewArrayItemConcatAssignToAssignRector |
Ported |
lint/complexity/no-constant-via-variable |
VariableConstFetchToClassConstFetchRector |
Ported |
lint/complexity/no-dirname-dir-concat |
DirnameDirConcatStringToDirectStringPathRector |
Ported |
lint/complexity/no-negated-boolean-literal |
ReplaceConstantBooleanNotRector |
Ported |
lint/complexity/no-negated-group |
NegatedAndsToPositiveOrsRector, SimplifyDeMorganBinaryRector |
Ported |
lint/complexity/no-negated-instanceof-ternary |
FlipNegatedTernaryInstanceofRector |
Ported |
lint/complexity/no-phpdoc-class-case-mismatch |
FixClassCaseSensitivityVarDocblockRector |
Ported |
lint/complexity/no-redundant-null-check |
SimplifyIfNotNullReturnRector, SimplifyIfNullableReturnRector |
Ported |
lint/complexity/no-single-case-switch |
SingularSwitchToIfRector |
Ported |
lint/complexity/no-single-item-in-array |
SingleInArrayToCompareRector |
Ported |
lint/complexity/no-sole-value-sprintf |
RemoveSoleValueSprintfRector |
Ported |
lint/complexity/no-useless-array-values |
SimplifyInArrayValuesRector |
Ported |
lint/complexity/prefer-absolute-include |
AbsolutizeRequireAndIncludePathRector |
Ported |
lint/complexity/prefer-array-literal |
ArrayMergeOfNonArraysToSimpleArrayRector |
Ported |
lint/complexity/prefer-coalesce-over-empty-ternary |
TernaryEmptyArrayArrayDimFetchToCoalesceRector |
Ported |
lint/complexity/prefer-empty-array-compare |
SimplifyEmptyArrayCheckRector, SimplifyEmptyCheckOnEmptyArrayRector |
Ported |
lint/complexity/prefer-explicit-array-comparison |
ArrayExplicitBoolCompareRector |
Ported |
lint/complexity/prefer-func-num-args |
SimplifyFuncGetArgsCountRector |
Ported |
lint/complexity/prefer-if-statement |
InlineIfToExplicitIfRector |
Ported |
lint/complexity/prefer-in-array |
ForeachToInArrayRector, RepeatedOrEqualToInArrayRector, SimplifyArraySearchRector |
Ported |
lint/complexity/prefer-inline-array-return |
InlineArrayReturnAssignRector |
Ported |
lint/complexity/prefer-instance-method |
LocallyCalledStaticMethodToNonStaticRector |
Ported |
lint/complexity/prefer-min-max |
NumberCompareToMaxFuncCallRector |
Ported |
lint/complexity/prefer-not-in-array |
RepeatedAndNotEqualToNotInArrayRector |
Ported |
lint/complexity/prefer-null-coalesce |
ArrayKeyExistsTernaryThenValueToCoalescingRector, ConsecutiveNullCompareReturnsToNullCoalesceQueueRector, SimplifyForeachToCoalescingRector |
Ported |
lint/complexity/prefer-property-default |
InlineConstructorDefaultToPropertyRector |
Ported |
lint/complexity/prefer-property-exists |
IssetOnPropertyObjectToPropertyExistsRector |
Ported |
lint/complexity/prefer-simple-condition |
BooleanNotIdenticalToNotIdenticalRector, SimplifyConditionsRector |
Ported |
lint/complexity/require-attribute-argument-order |
SortAttributeNamedArgsRector |
Ported |
lint/complexity/require-consistent-return |
ExplicitReturnNullRector |
Ported |
lint/complexity/require-is-a-allow-string |
IsAWithStringWithThirdArgumentRector |
Ported |
lint/complexity/require-named-argument-order |
SortCallLikeNamedArgsRector |
Ported |
lint/complexity/require-previous-exception |
ThrowWithPreviousExceptionRector |
Ported |
lint/control-flow/no-else-after-return |
RemoveAlwaysElseRector |
Ported |
lint/control-flow/prefer-bool-return |
SimplifyIfReturnBoolRector |
Ported |
lint/dead-code/no-implode-ternary |
TernaryImplodeToImplodeRector |
Ported |
lint/dead-code/no-useless-ternary |
SimplifyTautologyTernaryRector, UnnecessaryTernaryExpressionRector |
Ported |
lint/functions/no-extra-arguments |
RemoveExtraParametersRector |
Ported |
lint/functions/no-required-after-optional |
OptionalParametersAfterRequiredRector |
Ported |
lint/operators/no-and-or-keywords |
LogicalToBooleanRector |
Ported |
lint/refactor/rename-function |
RenameFunctionRector |
Ported |
lint/statements/add-safe-strict-types |
SafeDeclareStrictTypesRector |
Ported |
lint/style/no-array-push |
ChangeArrayPushToArrayAssignRector |
Ported |
lint/style/no-assign-in-ternary-branch |
TernaryConditionVariableAssignmentRector |
Ported |
lint/style/prefer-compound-assignment |
CombinedAssignRector |
Ported |
lint/style/prefer-early-return |
ChangeIfElseValueAssignToEarlyReturnRector |
Ported |
lint/style/prefer-early-return-over-prepared-value |
PreparedValueToEarlyReturnRector |
Ported |
lint/style/prefer-empty-string-compare |
StrlenZeroToIdenticalEmptyStringRector |
Ported |
lint/types/no-nullsafe-on-non-null |
CleanupUnneededNullsafeOperatorRector |
Ported |
lint/types/prefer-explicit-null-instanceof |
ExplicitNullableObjectInstanceRector |
Ported |
lint/types/prefer-identical-same-type |
UseIdenticalOverEqualWithSameTypeRector |
Ported |
lint/types/prefer-instanceof |
InlineIsAInstanceOfRector |
Ported |