File tree Expand file tree Collapse file tree 3 files changed +30
-1
lines changed Expand file tree Collapse file tree 3 files changed +30
-1
lines changed Original file line number Diff line number Diff line change 1010! /composer.json
1111! /phpstan.neon
1212! /README.md
13+ ! /rector.php
1314! /tests.xml
Original file line number Diff line number Diff line change 1717 "require-dev" : {
1818 "phpunit/phpunit" : " >= 6.0" ,
1919 "phpstan/phpstan" : " >= 0.1" ,
20- "jetbrains/phpstorm-attributes" : " ^1.0"
20+ "jetbrains/phpstorm-attributes" : " ^1.0" ,
21+ "rector/rector" : " ^0.18.13"
2122 },
2223 "autoload" : {
2324 "psr-4" : {
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ declare (strict_types=1 );
4+
5+ use Rector \CodeQuality \Rector \Class_ \InlineConstructorDefaultToPropertyRector ;
6+ use Rector \Config \RectorConfig ;
7+ use Rector \DeadCode \Rector \ClassMethod \RemoveUselessParamTagRector ;
8+ use Rector \Php80 \Rector \FunctionLike \MixedTypeRector ;
9+ use Rector \Set \ValueObject \LevelSetList ;
10+
11+ return static function (RectorConfig $ rectorConfig ): void {
12+ $ rectorConfig ->paths ([
13+ __DIR__ . '/src ' ,
14+ __DIR__ . '/tests ' ,
15+ ]);
16+
17+ // register a single rule
18+ $ rectorConfig ->rule (InlineConstructorDefaultToPropertyRector::class);
19+
20+ $ rectorConfig ->skip ([RemoveUselessParamTagRector::class]);
21+ $ rectorConfig ->skip ([MixedTypeRector::class]);
22+
23+ // define sets of rules
24+ $ rectorConfig ->sets ([
25+ LevelSetList::UP_TO_PHP_80
26+ ]);
27+ };
You can’t perform that action at this time.
0 commit comments