rector-phpunit/phpunit-code-quality set
rector-phpunit’s phpunit-code-quality set: the Pun lint rules its Rector rules map to, and nothing else.
[lint]
sets = ["rector-phpunit/phpunit-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 (62)
| Rule | Rector rules | Status |
|---|---|---|
lint/phpunit/add-depended-test-return-type |
AddReturnTypeToDependedRector |
Ported |
lint/phpunit/add-instanceof-assert |
AddInstanceofAssertForNullableInstanceRector |
Ported |
lint/phpunit/add-instanceof-assert-for-argument |
AddInstanceofAssertForNullableArgumentRector |
Ported |
lint/phpunit/add-param-type-depends |
AddParamTypeFromDependsRector |
Ported |
lint/phpunit/add-stub-intersection-type |
AddStubIntersectionVarToStubPropertyRector |
Ported |
lint/phpunit/add-will-return-callback-false-fallback |
WillReturnCallbackFallbackToReturnFalseRector |
Ported |
lint/phpunit/add-will-return-callback-param-type |
TypeWillReturnCallableArrowFunctionRector |
Ported |
lint/phpunit/no-assert-same-type-mismatch |
MatchAssertSameExpectedTypeRector |
Ported |
lint/phpunit/no-at-matcher |
ReplaceAtMethodWithDesiredMatcherRector |
Ported |
lint/phpunit/no-bare-mock-assign |
BareCreateMockAssignToDirectUseRector |
Ported |
lint/phpunit/no-bare-mock-builder |
GetMockBuilderGetMockToCreateMockRector |
Ported |
lint/phpunit/no-empty-test |
RemoveEmptyTestMethodRector |
Ported |
lint/phpunit/no-entity-mock |
EntityDocumentCreateMockToDirectNewRector |
Ported |
lint/phpunit/no-expects-any |
RemoveExpectAnyFromMockRector |
Ported |
lint/phpunit/no-flipped-assertion |
FlipAssertRector |
Ported |
lint/phpunit/no-float-delta-parameter |
AssertEqualsOrAssertSameFloatParameterToSpecificMethodsTypeRector |
Ported |
lint/phpunit/no-mock-intersection-property |
SingleMockPropertyTypeRector |
Ported |
lint/phpunit/no-negated-assertion |
AssertNotOperatorRector |
Ported |
lint/phpunit/no-setup-override-attribute |
NoSetupWithParentCallOverrideRector |
Ported |
lint/phpunit/no-test-constructor |
ConstructClassMethodToSetUpTestCaseRector |
Ported |
lint/phpunit/no-unused-mock |
RemoveStandaloneCreateMockRector |
Ported |
lint/phpunit/no-unused-mock-property |
RemoveNeverUsedMockPropertyRector |
Ported |
lint/phpunit/no-value-object-mock |
DirectInstanceOverMockArgRector |
Ported |
lint/phpunit/prefer-assert |
AssertFuncCallToPHPUnitAssertRector |
Ported |
lint/phpunit/prefer-assert-array-has-key |
AssertIssetToSpecificMethodRector |
Ported |
lint/phpunit/prefer-assert-count |
AssertCompareOnCountableWithMethodToAssertCountRector |
Ported |
lint/phpunit/prefer-assert-instanceof |
AssertInstanceOfComparisonRector |
Ported |
lint/phpunit/prefer-assert-instanceof-over-empty |
AssertEmptyNullableObjectToAssertInstanceofRector |
Ported |
lint/phpunit/prefer-assert-instances-of |
SimplifyForeachInstanceOfRector |
Ported |
lint/phpunit/prefer-assert-null-true-false |
AssertSameBoolNullToSpecificMethodRector |
Ported |
lint/phpunit/prefer-assert-same |
AssertEqualsToSameRector |
Ported |
lint/phpunit/prefer-assert-string-contains |
AssertFalseStrposToContainsRector |
Ported |
lint/phpunit/prefer-assert-true-false |
AssertSameTrueFalseToAssertTrueFalseRector |
Ported |
lint/phpunit/prefer-comparison-assertion |
AssertComparisonToSpecificMethodRector |
Ported |
lint/phpunit/prefer-create-stub |
PropertyCreateMockToCreateStubRector |
Ported |
lint/phpunit/prefer-create-stub-argument |
CreateStubOverCreateMockArgRector |
Ported |
lint/phpunit/prefer-create-stub-expression |
ExpressionCreateMockToCreateStubRector |
Ported |
lint/phpunit/prefer-data-provider |
TestWithToDataProviderRector |
Ported |
lint/phpunit/prefer-inline-create-stub |
InlineStubPropertyToCreateStubMethodCallRector |
Ported |
lint/phpunit/prefer-local-over-setup-property |
NarrowUnusedSetUpDefinedPropertyRector |
Ported |
lint/phpunit/prefer-mock-intersection-return |
ChangeMockObjectReturnUnionToIntersectionRector |
Ported |
lint/phpunit/prefer-narrow-will-return-callback |
NarrowSingleWillReturnCallbackRector |
Ported |
lint/phpunit/prefer-narrow-with-consecutive |
NarrowIdenticalWithConsecutiveRector |
Ported |
lint/phpunit/prefer-property-assertions |
AssertArrayCastedObjectToAssertSameRector |
Ported |
lint/phpunit/prefer-simple-callback-assert |
CallbackSingleAssertToSimplerRector |
Ported |
lint/phpunit/prefer-simple-mock-expectation |
SingleWithConsecutiveToWithRector |
Ported |
lint/phpunit/prefer-simple-with-matcher |
UseSpecificWithMethodRector |
Ported |
lint/phpunit/prefer-specific-true-false-assertion |
AssertTrueFalseToSpecificMethodRector |
Ported |
lint/phpunit/prefer-specific-will-method |
UseSpecificWillMethodRector |
Ported |
lint/phpunit/prefer-standalone-asserts-over-callback |
WithCallbackIdenticalToStandaloneAssertsRector |
Ported |
lint/phpunit/prefer-stub-var |
MockObjectVarToStubRector |
Ported |
lint/phpunit/prefer-test-prefix |
ReplaceTestAnnotationWithPrefixedFunctionRector |
Ported |
lint/phpunit/prefer-this-call |
PreferPHPUnitThisCallRector |
Ported |
lint/phpunit/prefer-will-return-callback |
MergeWithCallableAndWillReturnRector, VoidMethodWithCallbackToWillReturnCallbackRector |
Ported |
lint/phpunit/prefer-with-is-instance-of |
SimplerWithIsInstanceOfRector |
Ported |
lint/phpunit/prefer-yield-data-provider |
YieldDataProviderRector |
Ported |
lint/phpunit/require-data-provider-newlines |
DataProviderArrayItemsNewLinedRector |
Ported |
lint/phpunit/require-exact-test-argument-type |
ScalarArgumentToExpectedParamTypeRector |
Ported |
lint/phpunit/require-final-test-case |
FinalizeTestCaseClassRector |
Ported |
lint/phpunit/require-mock-expects |
DecorateWillReturnMapWithExpectsMockRector |
Ported |
lint/phpunit/require-strict-types-in-tests |
DeclareStrictTypesTestsRector |
Ported |
lint/phpunit/require-string-assert-argument |
StringCastAssertStringContainsStringRector |
Ported |