mirror of
https://github.com/rectorphp/rector.git
synced 2024-06-06 11:20:50 +00:00
Update README to use the new config syntax
This commit is contained in:
parent
39c0390278
commit
5dfcca1841
10
README.md
10
README.md
|
@ -46,16 +46,16 @@ use Rector\Config\RectorConfig;
|
|||
use Rector\Set\ValueObject\SetList;
|
||||
use Rector\TypeDeclaration\Rector\Property\TypedPropertyFromStrictConstructorRector;
|
||||
|
||||
return static function (RectorConfig $rectorConfig): void {
|
||||
return RectorConfig::configure()
|
||||
// register single rule
|
||||
$rectorConfig->rule(TypedPropertyFromStrictConstructorRector::class);
|
||||
|
||||
->withRules([
|
||||
TypedPropertyFromStrictConstructorRector::class
|
||||
])
|
||||
// here we can define, what sets of rules will be applied
|
||||
// tip: use "SetList" class to autocomplete sets with your IDE
|
||||
$rectorConfig->sets([
|
||||
->withSets([
|
||||
SetList::CODE_QUALITY
|
||||
]);
|
||||
};
|
||||
```
|
||||
|
||||
Then dry run Rector:
|
||||
|
|
Loading…
Reference in New Issue
Block a user