Skip to content
Esc
↑↓navigate↵open⌘Jpreview
On this page

rector/type-declaration set

Rector’s type-declaration set: the Pun lint rules its Rector rules map to, and nothing else.

[lint]
sets = ["rector/type-declaration"]

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 (61)

Rule Rector rules Status
lint/phpunit/add-closure-return-type-from-assert ClosureReturnTypeFromAssertInstanceOfRector Ported
lint/phpunit/add-data-provider-iterator-return-type ReturnIteratorInDataProviderRector Ported
lint/phpunit/add-property-type-container-get TypedPropertyFromContainerGetSetUpRector Ported
lint/phpunit/add-property-type-create-mock TypedPropertyFromCreateMockAssignRector Ported
lint/phpunit/add-property-type-setup TypedPropertyFromStrictSetUpRector Ported
lint/phpunit/add-property-type-setup-docblock TypedPropertyFromDocblockSetUpDefinedRector Ported
lint/phpunit/add-return-type-from-mock-object ReturnTypeFromMockObjectRector Ported
lint/phpunit/add-test-void-return AddTestsVoidReturnTypeWhereNoReturnRector Ported
lint/types/add-array-return-type ReturnTypeFromReturnDirectArrayRector Ported
lint/types/add-arrow-function-return-type AddArrowFunctionReturnTypeRector Ported
lint/types/add-bool-return-type BoolReturnTypeFromBooleanStrictReturnsRector Ported
lint/types/add-bool-return-type-from-const BoolReturnTypeFromBooleanConstReturnsRector Ported
lint/types/add-bool-return-type-from-mixed-returns BoolReturnTypeFromBooleanConstAndStrictReturnsRector Ported
lint/types/add-closure-never-return AddClosureNeverReturnTypeRector Ported
lint/types/add-closure-return-type ClosureReturnTypeRector Ported
lint/types/add-closure-void-return AddClosureVoidReturnTypeWhereNoReturnRector Ported
lint/types/add-datetime-property-type MergeDateTimePropertyTypeDeclarationRector Ported
lint/types/add-fluent-return-type ReturnTypeFromStrictFluentReturnRector Ported
lint/types/add-function-void-return AddFunctionVoidReturnTypeWhereNoReturnRector Ported
lint/types/add-magic-method-return-type KnownMagicClassMethodTypeRector Ported
lint/types/add-method-void-return AddVoidReturnTypeWhereNoReturnRector Ported
lint/types/add-never-return-type ReturnNeverTypeRector Ported
lint/types/add-nullable-return-type ReturnNullableTypeRector Ported
lint/types/add-numeric-return-type NumericReturnTypeFromStrictReturnsRector Ported
lint/types/add-numeric-return-type-from-scalar NumericReturnTypeFromStrictScalarReturnsRector Ported
lint/types/add-param-type-array-any-all AddArrayAnyAllClosureParamTypeRector Ported
lint/types/add-param-type-array-dim-fetch StrictArrayParamDimFetchRector Ported
lint/types/add-param-type-array-function AddArrayFunctionClosureParamTypeRector Ported
lint/types/add-param-type-array-map AddClosureParamTypeForArrayMapRector Ported
lint/types/add-param-type-array-reduce AddClosureParamTypeForArrayReduceRector Ported
lint/types/add-param-type-arrow-dim-fetch AddArrowFunctionParamArrayWhereDimFetchRector Ported
lint/types/add-param-type-data-provider AddParamTypeBasedOnPHPUnitDataProviderRector Ported
lint/types/add-param-type-dim-fetch-key AddParamFromDimFetchKeyUseRector Ported
lint/types/add-param-type-iterable-method-call AddClosureParamTypeFromIterableMethodCallRector Ported
lint/types/add-param-type-method-call AddMethodCallBasedStrictParamTypeRector Ported
lint/types/add-param-type-property AddParamTypeFromPropertyTypeRector Ported
lint/types/add-param-type-spl-fixed-array AddParamTypeSplFixedArrayRector Ported
lint/types/add-param-type-variable-call AddClosureParamTypeFromVariableCallRector Ported
lint/types/add-private-method-array-return-type PrivateMethodReturnTypeFromStrictNewArrayRector Ported
lint/types/add-property-type-assigns TypedPropertyFromAssignsRector Ported
lint/types/add-property-type-constructor TypedPropertyFromStrictConstructorRector Ported
lint/types/add-property-type-get-repository TypedPropertyFromGetRepositorySetUpRector Ported
lint/types/add-property-type-setter-getter PropertyTypeFromStrictSetterGetterRector Ported
lint/types/add-return-type-from-cast ReturnTypeFromReturnCastRector Ported
lint/types/add-return-type-from-constant ReturnTypeFromStrictConstantReturnRector Ported
lint/types/add-return-type-from-get-repository ReturnTypeFromGetRepositoryDocblockRector Ported
lint/types/add-return-type-from-native-call ReturnTypeFromStrictNativeCallRector Ported
lint/types/add-return-type-from-new ReturnTypeFromReturnNewRector Ported
lint/types/add-return-type-from-new-array ReturnTypeFromStrictNewArrayRector Ported
lint/types/add-return-type-from-param ReturnTypeFromStrictParamRector Ported
lint/types/add-return-type-from-parent AddReturnTypeDeclarationBasedOnParentClassMethodRector Ported
lint/types/add-return-type-from-property ReturnTypeFromStrictTypedPropertyRector Ported
lint/types/add-return-type-from-ternary ReturnTypeFromStrictTernaryRector Ported
lint/types/add-return-type-from-try-catch AddReturnTypeFromTryCatchTypeRector Ported
lint/types/add-return-type-from-typed-call ReturnTypeFromStrictTypedCallRector Ported
lint/types/add-return-type-from-yield AddReturnTypeDeclarationFromYieldsRector Ported
lint/types/add-string-return-type StringReturnTypeFromStrictStringReturnsRector Ported
lint/types/add-string-return-type-from-scalar StringReturnTypeFromStrictScalarReturnsRector Ported
lint/types/add-union-return-type ReturnUnionTypeRector Ported
lint/types/prefer-narrow-param-type NarrowArrayAnyAllNullableParamTypeRector Ported
lint/types/prefer-specific-return-type NarrowObjectReturnTypeRector Ported

Last updated on

Was this page helpful?