File tree Expand file tree Collapse file tree 3 files changed +52
-0
lines changed Expand file tree Collapse file tree 3 files changed +52
-0
lines changed Original file line number Diff line number Diff line change
1
+ on :
2
+ pull_request_target :
3
+ paths-ignore :
4
+ - ' docs/**'
5
+ - ' README.md'
6
+ - ' CHANGELOG.md'
7
+ - ' .gitignore'
8
+ - ' .gitattributes'
9
+ - ' infection.json.dist'
10
+ - ' psalm.xml'
11
+
12
+ name : rector
13
+
14
+ jobs :
15
+ rector :
16
+ uses : yiisoft/actions/.github/workflows/rector.yml@master
17
+ secrets :
18
+ token : ${{ secrets.YIISOFT_GITHUB_TOKEN }}
19
+ with :
20
+ repository : ${{ github.event.pull_request.head.repo.full_name }}
21
+ os : >-
22
+ ['ubuntu-latest']
23
+ php : >-
24
+ ['8.3']
Original file line number Diff line number Diff line change 34
34
"require-dev" : {
35
35
"maglnet/composer-require-checker" : " ^3.8|^4.4" ,
36
36
"phpunit/phpunit" : " ^9.5" ,
37
+ "rector/rector" : " ^1.2" ,
37
38
"roave/infection-static-analysis-plugin" : " ^1.16" ,
38
39
"spatie/phpunit-watcher" : " ^1.23" ,
39
40
"vimeo/psalm" : " ^4.18"
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 \Php74 \Rector \Closure \ClosureToArrowFunctionRector ;
8
+ use Rector \Set \ValueObject \LevelSetList ;
9
+
10
+ return static function (RectorConfig $ rectorConfig ): void {
11
+ $ rectorConfig ->paths ([
12
+ __DIR__ . '/src ' ,
13
+ __DIR__ . '/tests ' ,
14
+ ]);
15
+
16
+ // register a single rule
17
+ $ rectorConfig ->rule (InlineConstructorDefaultToPropertyRector::class);
18
+
19
+ // define sets of rules
20
+ $ rectorConfig ->sets ([
21
+ LevelSetList::UP_TO_PHP_74 ,
22
+ ]);
23
+
24
+ $ rectorConfig ->skip ([
25
+ ClosureToArrowFunctionRector::class,
26
+ ]);
27
+ };
You can’t perform that action at this time.
0 commit comments