Skip to content

Commit

Permalink
update dev dependency rector/rector to ^1.0.3
Browse files Browse the repository at this point in the history
  • Loading branch information
usarise committed Mar 19, 2024
1 parent ddcfa0d commit dfbc177
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 33 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"nyholm/psr7": "^1.8.1",
"phpstan/phpstan": "^1.10.63",
"phpunit/phpunit": "^10.5.13",
"rector/rector": "^0.19.8",
"rector/rector": "^1.0.3",
"symfony/http-client": "^6.4.5"
},
"autoload": {
Expand Down
16 changes: 8 additions & 8 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

47 changes: 23 additions & 24 deletions rector.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,33 +2,32 @@

declare(strict_types=1);

use Rector\CodeQuality\Rector\Class_\InlineConstructorDefaultToPropertyRector;
use Rector\CodingStyle\Rector\Stmt\NewlineAfterStatementRector;
use Rector\Config\RectorConfig;
use Rector\Set\ValueObject\LevelSetList;
use Rector\Set\ValueObject\SetList;

return static function (RectorConfig $rectorConfig): void {
$rectorConfig->cacheDirectory(__DIR__ . '/var/cache/rector');

$rectorConfig->paths([
return RectorConfig::configure()
->withCache(
cacheDirectory: __DIR__ . '/var/cache/rector',
)
->withPaths([
__DIR__ . '/src',
__DIR__ . '/tests',
]);

$rectorConfig->rule(InlineConstructorDefaultToPropertyRector::class);

$rectorConfig->skip([
])
->withSkip([
NewlineAfterStatementRector::class,
]);

$rectorConfig->sets([
LevelSetList::UP_TO_PHP_81,
SetList::DEAD_CODE,
SetList::CODE_QUALITY,
SetList::CODING_STYLE,
SetList::EARLY_RETURN,
SetList::TYPE_DECLARATION,
SetList::PRIVATIZATION,
]);
};
])
->withPreparedSets(
deadCode: true,
codeQuality: true,
codingStyle: true,
typeDeclarations: true,
privatization: true,
earlyReturn: true,
instanceOf: true,
)
->withAttributesSets(
phpunit: true,
)
->withPhpSets()
->withRootFiles()
;

0 comments on commit dfbc177

Please sign in to comment.