Created
January 13, 2024 22:44
-
-
Save JustSteveKing/3b59fe619f8f7f25a8e2554253661c7f to your computer and use it in GitHub Desktop.
Laravel Rector Config
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
declare(strict_types=1); | |
use Rector\CodeQuality\Rector\Class_\InlineConstructorDefaultToPropertyRector; | |
use Rector\Config\RectorConfig; | |
use Rector\Set\ValueObject\LevelSetList; | |
use Rector\Set\ValueObject\SetList; | |
return static function (RectorConfig $rectorConfig): void { | |
$rectorConfig->paths([ | |
__DIR__ . '/app', | |
__DIR__ . '/bootstrap', | |
__DIR__ . '/config', | |
__DIR__ . '/database', | |
__DIR__ . '/routes', | |
]); | |
$rectorConfig->rules([ | |
InlineConstructorDefaultToPropertyRector::class, | |
]); | |
$rectorConfig->sets([ | |
LevelSetList::UP_TO_PHP_83, | |
SetList::CODE_QUALITY, | |
SetList::DEAD_CODE, | |
SetList::EARLY_RETURN, | |
SetList::TYPE_DECLARATION, | |
SetList::PRIVATIZATION, | |
]); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment