mirror of
https://github.com/rico-vz/HeimerdingerLoL.git
synced 2025-12-06 10:10:48 +01:00
feat(deps): add Rector for code quality improvements
- Added "rector/rector" package to composer.json - Created rector.php configuration file with rules for code quality improvements
This commit is contained in:
22
rector.php
Normal file
22
rector.php
Normal file
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
use Rector\Config\RectorConfig;
|
||||
use Rector\Set\ValueObject\LevelSetList;
|
||||
use Rector\Set\ValueObject\SetList;
|
||||
use Rector\TypeDeclaration\Rector\Property\TypedPropertyFromStrictConstructorRector;
|
||||
|
||||
return static function (RectorConfig $rectorConfig): void {
|
||||
// register single rule
|
||||
$rectorConfig->rule(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([
|
||||
SetList::CODE_QUALITY,
|
||||
SetList::CODING_STYLE,
|
||||
SetList::DEAD_CODE,
|
||||
SetList::EARLY_RETURN,
|
||||
SetList::STRICT_BOOLEANS,
|
||||
LevelSetList::UP_TO_PHP_82
|
||||
]);
|
||||
};
|
||||
Reference in New Issue
Block a user