File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ on :
2+ pull_request :
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+ with :
18+ os : >-
19+ ['ubuntu-latest']
20+ php : >-
21+ ['8.0']
Original file line number Diff line number Diff line change 6363 "codeception/module-cli" : " ^2.0" ,
6464 "codeception/module-phpbrowser" : " ^3.0" ,
6565 "phpunit/phpunit" : " ^9.5" ,
66+ "rector/rector" : " ^0.14.3" ,
6667 "roave/infection-static-analysis-plugin" : " ^1.16" ,
6768 "roave/security-advisories" : " dev-master" ,
6869 "spatie/phpunit-watcher" : " ^1.23" ,
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 \Set \ValueObject \LevelSetList ;
8+
9+ return static function (RectorConfig $ rectorConfig ): void {
10+ $ rectorConfig ->paths ([
11+ __DIR__ . '/src ' ,
12+ __DIR__ . '/tests ' ,
13+ ]);
14+
15+ // register a single rule
16+ $ rectorConfig ->rule (InlineConstructorDefaultToPropertyRector::class);
17+
18+ // define sets of rules
19+ $ rectorConfig ->sets ([
20+ LevelSetList::UP_TO_PHP_80 ,
21+ ]);
22+ };
Original file line number Diff line number Diff line change 99
1010final class CommonViewInjection implements CommonParametersInjectionInterface
1111{
12- private ApplicationParameters $ applicationParameters ;
13-
14- public function __construct (
15- ApplicationParameters $ applicationParameters
16- ) {
17- $ this ->applicationParameters = $ applicationParameters ;
12+ public function __construct (private ApplicationParameters $ applicationParameters )
13+ {
1814 }
1915
2016 public function getCommonParameters (): array
You can’t perform that action at this time.
0 commit comments