rector/php-sets set
Rector’s withPhpSets(): every PHP set, from rector/php52 up to [php] version. This page lists the rules of all of them.
[lint]
sets = ["rector/php-sets"]
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 (117)
| Rule | Rector rules | Status |
|---|---|---|
lint/classes/add-stringable |
StringableForToStringRector |
Ported |
lint/classes/prefer-self-in-final |
StaticToSelfOnFinalClassRector |
Ported |
lint/control-flow/no-switch-continue |
ContinueToBreakInSwitchRector |
Ported |
lint/dead-code/no-parent-call-without-parent |
RemoveParentCallWithoutParentRector |
Ported |
lint/functions/no-extra-arguments |
RemoveExtraParametersRector |
Ported |
lint/functions/no-required-after-optional |
OptionalParametersAfterRequiredRector |
Ported |
lint/operators/prefer-coalesce |
TernaryToNullCoalescingRector |
Ported |
lint/operators/prefer-coalesce-assign |
NullCoalescingOperatorRector |
Ported |
lint/php-5.3/no-http-vars |
ReplaceHttpServerVarsByServerRector |
Ported |
lint/php-5.5/no-class-magic-constant |
ClassConstantToSelfClassRector |
Ported |
lint/php-5.5/prefer-self-over-get-called-class |
GetCalledClassToSelfClassRector |
Ported |
lint/php-5.5/prefer-static-over-get-called-class |
GetCalledClassToStaticClassRector |
Ported |
lint/php-7.0/no-call-user-method |
CallUserMethodRector |
Ported |
lint/php-7.0/no-list-from-string |
ListSplitStringRector |
Ported |
lint/php-7.0/prefer-braced-variable-variable |
WrapVariableVariableNameInCurlyBracesRector |
Ported |
lint/php-7.0/prefer-coalesce-return |
IfIssetToCoalescingRector |
Ported |
lint/php-7.0/prefer-random-int |
RandomFunctionRector |
Ported |
lint/php-7.0/prefer-spaceship |
TernaryToSpaceshipRector |
Ported |
lint/php-7.0/prefer-spaceship-return |
IfToSpaceshipRector |
Ported |
lint/php-7.0/prefer-static-method-call |
ThisCallOnStaticMethodToStaticCallRector |
Ported |
lint/php-7.0/prefer-throwable-handler |
ExceptionHandlerTypehintRector |
Ported |
lint/php-7.0/prefer-time |
RenameMktimeWithoutArgsToTimeRector |
Ported |
lint/php-7.1/no-append-to-string |
AssignArrayToStringRector |
Ported |
lint/php-7.1/no-non-numeric-string-operand |
BinaryOpBetweenNumberAndStringRector |
Ported |
lint/php-7.1/prefer-is-iterable |
IsIterableRector |
Ported |
lint/php-7.1/prefer-multi-catch |
MultiExceptionCatchRector |
Ported |
lint/php-7.2/no-constant-define-name |
StringifyDefineRector |
Ported |
lint/php-7.2/no-each |
ReplaceEachAssignmentWithKeyCurrentRector |
Ported |
lint/php-7.2/no-get-class-null |
GetClassOnNullRector |
Ported |
lint/php-7.2/no-list-each |
ListEachRector |
Ported |
lint/php-7.2/no-string-assert |
StringsAssertNakedRector |
Ported |
lint/php-7.2/prefer-foreach-over-each |
WhileEachToForeachRector |
Ported |
lint/php-7.2/require-parse-str-result |
ParseStrWithResultArgumentRector |
Ported |
lint/php-7.3/no-case-insensitive-constant |
SensitiveConstantNameRector |
Ported |
lint/php-7.3/no-case-insensitive-define |
SensitiveDefineRector |
Ported |
lint/php-7.3/no-heredoc-label-in-body |
SensitiveHereNowDocRector |
Ported |
lint/php-7.3/no-unescaped-regex-dash |
RegexDashEscapeRector |
Ported |
lint/php-7.3/prefer-array-key-first |
ArrayKeyFirstLastRector |
Ported |
lint/php-7.3/prefer-array-key-first-last |
ArrayKeysToArrayKeyFirstLastRector |
Ported |
lint/php-7.3/prefer-is-countable |
IsCountableRector |
Ported |
lint/php-7.3/prefer-setcookie-options |
SetCookieRector |
Ported |
lint/php-7.3/require-string-needle |
StringifyStrNeedlesRector |
Ported |
lint/php-7.4/add-null-property-default |
RestoreDefaultNullToNullableTypePropertyRector |
Ported |
lint/php-7.4/no-array-key-exists-on-object |
ArrayKeyExistsOnPropertyRector |
Ported |
lint/php-7.4/no-filter-magic-quotes |
FilterVarToAddSlashesRector |
Ported |
lint/php-7.4/no-hebrevc |
HebrevcToNl2brHebrevRector |
Ported |
lint/php-7.4/no-mb-strrpos-encoding-offset |
MbStrrposEncodingArgumentPositionRector |
Ported |
lint/php-7.4/no-money-format |
MoneyFormatToNumberFormatRector |
Ported |
lint/php-7.4/no-reflection-export |
ExportToReflectionFunctionRector |
Ported |
lint/php-7.4/no-restore-include-path |
RestoreIncludePathToIniRestoreRector |
Ported |
lint/php-7.4/prefer-arrow-function |
ClosureToArrowFunctionRector |
Ported |
lint/php-7.4/prefer-coalesce-assign-over-if |
IfToNullCoalescingAssignRector |
Ported |
lint/php-8.0/no-int-get-headers-format |
GetHeadersArgumentFormatRector |
Ported |
lint/php-8.0/no-unused-catch-variable |
RemoveUnusedVariableInCatchRector |
Ported |
lint/php-8.0/no-version-compare-operator-alias |
VersionCompareFuncCallArgumentRector |
Ported |
lint/php-8.0/prefer-get-debug-type |
GetDebugTypeRector |
Ported |
lint/php-8.0/prefer-match |
ChangeSwitchToMatchRector |
Ported |
lint/php-8.0/prefer-nullsafe-over-ternary |
TernaryToNullsafeCoalesceRector |
Ported |
lint/php-8.0/prefer-static-class |
ClassOnThisVariableObjectRector |
Ported |
lint/php-8.0/prefer-str-ends-with |
StrEndsWithRector |
Ported |
lint/php-8.0/prefer-str-starts-with |
StrStartsWithRector |
Ported |
lint/php-8.1/no-closure-from-callable |
ClosureFromCallableToFirstClassCallableRector |
Ported |
lint/php-8.1/no-null-preg-split-limit |
NullToStrictIntPregSlitFuncCallLimitArgRector |
Ported |
lint/php-8.1/no-reflection-set-accessible |
RemoveReflectionSetAccessibleCallsRector |
Ported |
lint/php-8.1/prefer-enum-case-over-myclabs-call |
MyCLabsMethodCallToEnumConstRector |
Ported |
lint/php-8.1/prefer-enum-case-over-spatie-call |
SpatieEnumMethodCallToEnumConstRector |
Ported |
lint/php-8.1/prefer-enum-from |
MyCLabsConstructorCallToEnumFromRector |
Ported |
lint/php-8.1/prefer-first-class-callable-argument |
FunctionFirstClassCallableRector |
Ported |
lint/php-8.1/prefer-first-class-callable-over-array |
ArrayToFirstClassCallableRector |
Ported |
lint/php-8.1/prefer-first-class-callable-over-arrow-function |
ArrowFunctionDelegatingCallToFirstClassCallableRector |
Ported |
lint/php-8.1/prefer-first-class-callable-over-closure |
ClosureDelegatingCallToFirstClassCallableRector |
Ported |
lint/php-8.1/prefer-native-enum-over-myclabs |
MyCLabsClassToEnumRector |
Ported |
lint/php-8.1/prefer-native-enum-over-spatie |
SpatieEnumClassToEnumRector |
Ported |
lint/php-8.1/prefer-readonly-property |
ReadOnlyPropertyRector |
Ported |
lint/php-8.2/add-skip-dots-flag |
FilesystemIteratorSkipDotsRector |
Ported |
lint/php-8.2/no-dollar-brace-interpolation |
VariableInStringInterpolationFixerRector |
Ported |
lint/php-8.2/no-utf8-encode-decode |
Utf8DecodeEncodeToMbConvertEncodingRector |
Ported |
lint/php-8.2/prefer-readonly-class |
ReadOnlyClassRector |
Ported |
lint/php-8.3/add-const-type |
AddTypeToConstRector |
Ported |
lint/php-8.3/prefer-dynamic-class-constant |
DynamicClassConstFetchRector |
Ported |
lint/php-8.3/prefer-json-validate |
JsonValidateRector |
Ported |
lint/php-8.3/prefer-ldap-uri |
CombineHostPortLdapUriRector |
Ported |
lint/php-8.3/prefer-readonly-anonymous-class |
ReadOnlyAnonymousClassRector |
Ported |
lint/php-8.3/prefer-self-class |
RemoveGetClassGetParentClassNoArgsRector |
Ported |
lint/php-8.4/add-csv-escape-argument |
AddEscapeArgumentRector |
Ported |
lint/php-8.4/prefer-array-find |
ForeachToArrayAllRector, ForeachToArrayAnyRector, ForeachToArrayFindKeyRector, ForeachToArrayFindRector |
Ported |
lint/php-8.4/prefer-round-mode-enum |
RoundingModeEnumRector |
Ported |
lint/php-8.5/no-finfo-buffer-context |
RemoveFinfoBufferContextArgRector |
Ported |
lint/php-8.5/no-null-array-key |
ArrayKeyExistsNullToEmptyStringRector |
Ported |
lint/php-8.5/no-null-debug-info |
NullDebugInfoReturnRector |
Ported |
lint/php-8.5/no-out-of-range-chr |
ChrArgModuloRector |
Ported |
lint/php-8.5/prefer-array-first-last |
ArrayFirstLastRector |
Ported |
lint/php-8.5/prefer-ord-first-byte |
OrdSingleByteRector |
Ported |
lint/php-8.6/prefer-clamp |
MinMaxToClampRector |
Ported |
lint/php-8.6/prefer-readonly-property-default |
ConstructorReadonlyAssignToDefaultRector |
Ported |
lint/refactor/add-override-attribute |
AddOverrideAttributeToOverriddenPropertiesRector |
Ported |
lint/refactor/remove-function-argument |
RemoveFuncCallArgRector |
Ported |
lint/refactor/remove-function-call |
RemoveFuncCallRector |
Ported |
lint/refactor/rename-cast |
RenameCastRector |
Ported |
lint/refactor/rename-class-constant |
RenameClassConstFetchRector |
Ported |
lint/refactor/rename-constant |
RenameConstantRector |
Ported |
lint/refactor/rename-function |
RenameFunctionRector |
Ported |
lint/refactor/rename-method |
RenameMethodRector |
Ported |
lint/refactor/replace-static-with-function |
StaticCallToFuncCallRector |
Ported |
lint/style/no-ereg |
EregToPregMatchRector |
Ported |
lint/style/no-php4-constructor |
Php4ConstructorRector |
Ported |
lint/style/no-redundant-final |
FinalPrivateToPrivateVisibilityRector |
Ported |
lint/style/no-sleep-wakeup |
SleepToSerializeRector, WakeupToUnserializeRector |
Ported |
lint/style/prefer-class-constant |
StringClassNameToClassConstantRector |
Ported |
lint/style/prefer-class-keyword-on-object |
ClassOnObjectRector |
Ported |
lint/style/prefer-dir-constant |
DirNameFileConstantToDirConstantRector |
Ported |
lint/style/prefer-dirname-levels |
MultiDirnameRector |
Ported |
lint/style/prefer-pow-operator |
PowToExpRector |
Ported |
lint/style/prefer-short-ternary |
TernaryToElvisRector |
Ported |
lint/style/prefer-str-contains |
StrContainsRector |
Ported |
lint/style/require-implode-separator |
ConsistentImplodeRector |
Ported |
lint/types/add-never-return-type |
ReturnNeverTypeRector |
Ported |