|
6 | 6 | use Rector\CodeQuality\Rector\Identical\FlipTypeControlToUseExclusiveTypeRector; |
7 | 7 | use Rector\CodingStyle\Rector\Assign\SplitDoubleAssignRector; |
8 | 8 | use Rector\CodingStyle\Rector\Catch_\CatchExceptionNameMatchingTypeRector; |
| 9 | +use Rector\CodingStyle\Rector\Encapsed\EncapsedStringsToSprintfRector; |
9 | 10 | use Rector\Config\RectorConfig; |
10 | 11 | use Rector\EarlyReturn\Rector\Return_\ReturnBinaryOrToEarlyReturnRector; |
11 | 12 | use Rector\Php80\Rector\Class_\ClassPropertyAssignToConstructorPromotionRector; |
12 | 13 | use Rector\Php81\Rector\ClassConst\FinalizePublicClassConstantRector; |
13 | 14 | use Rector\Php81\Rector\Property\ReadOnlyPropertyRector; |
14 | 15 | use Rector\Set\ValueObject\LevelSetList; |
15 | 16 | use Rector\Set\ValueObject\SetList; |
| 17 | +use Rector\TypeDeclaration\Rector\FunctionLike\AddReturnTypeDeclarationFromYieldsRector; |
16 | 18 |
|
17 | 19 | return static function (RectorConfig $config): void { |
18 | 20 | $config->paths([__DIR__ . '/src']); |
|
26 | 28 | ]); |
27 | 29 |
|
28 | 30 | $config->skip([ |
29 | | - // |
30 | | - // Do not replace classic properties to promoted eq. These are |
31 | | - // completely different statements. |
32 | | - // |
33 | 31 | ClassPropertyAssignToConstructorPromotionRector::class, |
34 | | - |
35 | | - // |
36 | | - // This rector can break the Doctrine that replaces implementations |
37 | | - // with proxies, like: |
38 | | - // - private Collection $relation; // OK This can be replaced with a proxy |
39 | | - // + private readonly Collection $relation; // FAIL |
40 | | - // |
41 | 32 | ReadOnlyPropertyRector::class, |
42 | | - |
43 | | - // Totally pointless "improvements" |
44 | 33 | CatchExceptionNameMatchingTypeRector::class, |
45 | 34 | SplitDoubleAssignRector::class, |
46 | 35 | FinalizePublicClassConstantRector::class, |
47 | 36 | FlipTypeControlToUseExclusiveTypeRector::class, |
48 | 37 | ReturnBinaryOrToEarlyReturnRector::class, |
49 | 38 | LocallyCalledStaticMethodToNonStaticRector::class, |
| 39 | + EncapsedStringsToSprintfRector::class, |
| 40 | + AddReturnTypeDeclarationFromYieldsRector::class, |
50 | 41 | ]); |
51 | 42 | }; |
0 commit comments