|
11 | 11 | * @see https://github.com/guanguans/favorite-link
|
12 | 12 | */
|
13 | 13 |
|
14 |
| -use Ergebnis\Rector\Rules\Arrays\SortAssociativeArrayByKeyRector; |
15 |
| -use Rector\CodeQuality\Rector\FuncCall\CompactToVariablesRector; |
| 14 | +use Rector\Caching\ValueObject\Storage\FileCacheStorage; |
16 | 15 | use Rector\CodeQuality\Rector\If_\ExplicitBoolCompareRector;
|
17 | 16 | use Rector\CodeQuality\Rector\LogicalAnd\LogicalToBooleanRector;
|
18 | 17 | use Rector\CodingStyle\Rector\Closure\StaticClosureRector;
|
19 | 18 | use Rector\CodingStyle\Rector\Encapsed\EncapsedStringsToSprintfRector;
|
20 | 19 | use Rector\CodingStyle\Rector\Encapsed\WrapEncapsedVariableInCurlyBracesRector;
|
21 | 20 | use Rector\CodingStyle\Rector\Stmt\NewlineAfterStatementRector;
|
22 | 21 | use Rector\Config\RectorConfig;
|
| 22 | +use Rector\DeadCode\Rector\ClassMethod\RemoveEmptyClassMethodRector; |
23 | 23 | use Rector\DeadCode\Rector\ClassMethod\RemoveUselessReturnTagRector;
|
24 | 24 | use Rector\DowngradePhp80\Rector\FuncCall\DowngradeArrayFilterNullableCallbackRector;
|
25 | 25 | use Rector\EarlyReturn\Rector\If_\ChangeAndIfToEarlyReturnRector;
|
26 | 26 | use Rector\EarlyReturn\Rector\Return_\ReturnBinaryOrToEarlyReturnRector;
|
27 |
| -use Rector\Naming\Rector\ClassMethod\RenameParamToMatchTypeRector; |
28 | 27 | use Rector\Php73\Rector\String_\SensitiveHereNowDocRector;
|
29 | 28 | use Rector\PHPUnit\CodeQuality\Rector\Class_\AddSeeTestAnnotationRector;
|
30 | 29 | use Rector\PHPUnit\Set\PHPUnitSetList;
|
|
47 | 46 | $rectorConfig->parallel(240);
|
48 | 47 | // $rectorConfig->disableParallel();
|
49 | 48 | $rectorConfig->phpstanConfig(__DIR__.'/phpstan.neon');
|
50 |
| - $rectorConfig->phpVersion(PhpVersion::PHP_74); |
| 49 | + $rectorConfig->phpVersion(PhpVersion::PHP_83); |
51 | 50 | // $rectorConfig->cacheClass(FileCacheStorage::class);
|
52 | 51 | // $rectorConfig->cacheDirectory(__DIR__.'/.build/rector');
|
53 | 52 | // $rectorConfig->containerCacheDirectory(__DIR__.'/.build/rector');
|
54 | 53 | // $rectorConfig->disableParallel();
|
55 | 54 | // $rectorConfig->fileExtensions(['php']);
|
56 | 55 | // $rectorConfig->indent(' ', 4);
|
57 | 56 | // $rectorConfig->memoryLimit('2G');
|
58 |
| - // $rectorConfig->nestedChainMethodCallLimit(3); |
59 | 57 | // $rectorConfig->noDiffs();
|
60 |
| - // $rectorConfig->parameters()->set(Option::APPLY_AUTO_IMPORT_NAMES_ON_CHANGED_FILES_ONLY, true); |
61 | 58 | // $rectorConfig->removeUnusedImports();
|
62 | 59 |
|
63 | 60 | $rectorConfig->bootstrapFiles([
|
|
69 | 66 | ]);
|
70 | 67 |
|
71 | 68 | $rectorConfig->paths([
|
72 |
| - __DIR__.'/src', |
| 69 | + __DIR__.'/app', |
73 | 70 | __DIR__.'/tests',
|
74 | 71 | __DIR__.'/.*.php',
|
75 | 72 | __DIR__.'/*.php',
|
|
88 | 85 | ReturnBinaryOrToEarlyReturnRector::class,
|
89 | 86 | SensitiveHereNowDocRector::class,
|
90 | 87 | WrapEncapsedVariableInCurlyBracesRector::class,
|
91 |
| - CompactToVariablesRector::class => [ |
92 |
| - __DIR__.'/src/Foundation/Support/Utils.php', |
93 |
| - ], |
94 |
| - RemoveTraitUseRector::class => [ |
95 |
| - __DIR__.'/src/Foundation/Message.php', |
96 |
| - ], |
97 |
| - RenameParamToMatchTypeRector::class => [ |
98 |
| - __DIR__.'/src/Foundation/Authenticators/AggregateAuthenticator.php', |
99 |
| - __DIR__.'/src/Foundation/Exceptions/RequestException.php', |
| 88 | + RemoveEmptyClassMethodRector::class => [ |
| 89 | + __DIR__.'/app/Providers/AppServiceProvider.php', |
100 | 90 | ],
|
101 | 91 | StaticClosureRector::class => [
|
102 | 92 | __DIR__.'/tests',
|
103 | 93 | ],
|
104 |
| - StringToClassConstantRector::class => [ |
105 |
| - __DIR__.'/src/Foundation/Rfc', |
106 |
| - __DIR__.'/src/*/Messages/*.php', |
107 |
| - __DIR__.'/tests', |
108 |
| - __DIR__.'/src/Foundation/Support/Utils.php', |
109 |
| - __DIR__.'/src/Foundation/Response.php', |
110 |
| - ], |
111 |
| - // SortAssociativeArrayByKeyRector::class => [ |
112 |
| - // __DIR__.'/src', |
113 |
| - // __DIR__.'/tests', |
114 |
| - // ], |
115 | 94 |
|
116 | 95 | // paths
|
117 | 96 | __DIR__.'/tests.php',
|
|
132 | 111 | ]);
|
133 | 112 |
|
134 | 113 | $rectorConfig->sets([
|
135 |
| - DowngradeLevelSetList::DOWN_TO_PHP_74, |
136 |
| - LevelSetList::UP_TO_PHP_74, |
| 114 | + // DowngradeLevelSetList::DOWN_TO_PHP_83, |
| 115 | + LevelSetList::UP_TO_PHP_83, |
137 | 116 | SetList::CODE_QUALITY,
|
138 | 117 | SetList::CODING_STYLE,
|
139 | 118 | SetList::DEAD_CODE,
|
|
145 | 124 | SetList::EARLY_RETURN,
|
146 | 125 | SetList::INSTANCEOF,
|
147 | 126 |
|
148 |
| - PHPUnitSetList::PHPUNIT_90, |
| 127 | + PHPUnitSetList::PHPUNIT_100, |
149 | 128 | PHPUnitSetList::PHPUNIT_CODE_QUALITY,
|
150 | 129 | PHPUnitSetList::ANNOTATIONS_TO_ATTRIBUTES,
|
151 | 130 | ]);
|
|
0 commit comments