|
2 | 2 |
|
3 | 3 | use Rector\Config\RectorConfig; |
4 | 4 | use Rector\DeadCode\Rector\ClassLike\RemoveAnnotationRector; |
5 | | -use Rector\Php56\Rector\FunctionLike\AddDefaultValueForUndefinedVariableRector; |
6 | | -use Rector\Php71\Rector\FuncCall\RemoveExtraParametersRector; |
| 5 | +use Rector\Php70\Rector\StmtsAwareInterface\IfIssetToCoalescingRector; |
7 | 6 | use Rector\Php73\Rector\FuncCall\JsonThrowOnErrorRector; |
8 | 7 | use Rector\Set\ValueObject\LevelSetList; |
9 | | -use Rector\TypeDeclaration\Rector\Property\TypedPropertyFromAssignsRector; |
10 | 8 |
|
11 | 9 | return static function (RectorConfig $rectorConfig): void { |
12 | 10 | $rectorConfig->paths([ |
|
19 | 17 | // Modernize code |
20 | 18 | $rectorConfig->sets([LevelSetList::UP_TO_PHP_74]); |
21 | 19 |
|
| 20 | + // phpcs:disable Squiz.Arrays.ArrayDeclaration.KeySpecified |
22 | 21 | $rectorConfig->skip([ |
23 | | - // Falsely detect unassigned variables in code paths stopped by PHPUnit\Framework\Assert::markTestSkipped() |
24 | | - AddDefaultValueForUndefinedVariableRector::class => [ |
25 | | - __DIR__ . '/tests/', |
26 | | - ], |
27 | | - // @see https://github.com/phpstan/phpstan-src/pull/2429 |
28 | | - RemoveExtraParametersRector::class => [ |
29 | | - __DIR__ . '/src/Operation/', |
30 | | - ], |
31 | | - // Assigns wrong type due to outdated PHPStan stubs |
32 | | - TypedPropertyFromAssignsRector::class => [ |
33 | | - __DIR__ . '/src/Model/BSONIterator.php', |
34 | | - ], |
| 22 | + // Do not use ternaries extensively |
| 23 | + IfIssetToCoalescingRector::class, |
35 | 24 | // Not necessary in documentation examples |
36 | 25 | JsonThrowOnErrorRector::class => [ |
37 | 26 | __DIR__ . '/tests/DocumentationExamplesTest.php', |
38 | 27 | ], |
39 | 28 | ]); |
| 29 | + // phpcs:enable |
40 | 30 |
|
41 | 31 | // All classes are public API by default, unless marked with @internal. |
42 | 32 | $rectorConfig->ruleWithConfiguration(RemoveAnnotationRector::class, ['api']); |
|
0 commit comments