File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4545
4646 - name : Tests
4747 run : composer test
48+
49+ rector :
50+ name : Rector
51+ runs-on : ubuntu-latest
52+
53+ strategy :
54+ matrix :
55+ php :
56+ - 8.4
57+ fail-fast : false
58+
59+ steps :
60+ - name : Checkout
61+ uses : actions/checkout@v4
62+
63+ - name : Install PHP
64+ uses : shivammathur/setup-php@v2
65+ with :
66+ php-version : ${{ matrix.php }}
67+
68+ - name : Cache PHP dependencies
69+ uses : actions/cache@v4
70+ with :
71+ path : vendor
72+ key : ${{ runner.os }}-php-${{ matrix.php }}-composer-${{ hashFiles('**/composer.json') }}
73+ restore-keys : ${{ runner.os }}-php-${{ matrix.php }}-composer-
74+
75+ - name : Install dependencies
76+ run : composer install --prefer-dist --no-progress --no-suggest
77+
78+ - name : Tests
79+ run : vendor/bin/rector process --dry-run
Original file line number Diff line number Diff line change 2626 "phpunit/phpunit" : " ^8.0" ,
2727 "squizlabs/php_codesniffer" : " ^3.0" ,
2828 "oscarotero/php-cs-fixer-config" : " ^1.0" ,
29- "friendsofphp/php-cs-fixer" : " ^2.15"
29+ "friendsofphp/php-cs-fixer" : " ^2.15" ,
30+ "rector/rector" : " ^1|^2"
3031 },
3132 "autoload" : {
3233 "psr-4" : {
4344 " phpunit" ,
4445 " phpcs"
4546 ],
46- "cs-fix" : " php-cs-fixer fix"
47+ "cs-fix" : " php-cs-fixer fix" ,
48+ "rector" : " rector process"
4749 }
4850}
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ declare (strict_types=1 );
4+
5+ use Rector \Config \RectorConfig ;
6+ use Rector \Set \ValueObject \SetList ;
7+
8+ return RectorConfig::configure ()
9+ ->withPaths ([
10+ __DIR__ . '/src ' ,
11+ __DIR__ . '/tests ' ,
12+ ])
13+ ->withPhpSets ()
14+ ->withPreparedSets (typeDeclarations: true )
15+ ->withDeadCodeLevel (2 )
16+ ->withCodeQualityLevel (10 )
17+ ->withCodingStyleLevel (0 )
18+ ;
You can’t perform that action at this time.
0 commit comments