Skip to content

Commit

Permalink
[TypeDeclaration] Place ReturnTypeFromStrictFluentReturnRector before…
Browse files Browse the repository at this point in the history
… ReturnTypeFromReturnNewRector (#4926)

`ReturnTypeFromStrictFluentReturnRector` is specific for `return $this`, `return new self`, `return new static` which more speficic on verify class is anonymous, final class, and supported static return handling, so it needs to be placed before `ReturnTypeFromReturnNewRector` which more general.
  • Loading branch information
samsonasik committed Sep 6, 2023
1 parent aee4200 commit d3719c2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion config/set/type-declaration.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
TypedPropertyFromStrictConstructorReadonlyClassRector::class,
ParamTypeFromStrictTypedPropertyRector::class,
AddVoidReturnTypeWhereNoReturnRector::class,
ReturnTypeFromStrictFluentReturnRector::class,
ReturnTypeFromReturnNewRector::class,
TypedPropertyFromStrictGetterMethodReturnTypeRector::class,
AddMethodCallBasedStrictParamTypeRector::class,
Expand All @@ -76,7 +77,6 @@
NumericReturnTypeFromStrictScalarReturnsRector::class,
StrictArrayParamDimFetchRector::class,
ReturnUnionTypeRector::class,
ReturnTypeFromStrictFluentReturnRector::class,
StrictStringParamConcatRector::class,
]);
};

0 comments on commit d3719c2

Please sign in to comment.