Last active
March 14, 2023 19:38
-
-
Save bskiefer/ac52bbf4c73125c6d52ac1240c8b2ac6 to your computer and use it in GitHub Desktop.
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_\CompleteDynamicPropertiesRector; | |
use Rector\Config\RectorConfig; | |
use Rector\Core\ValueObject\PhpVersion; | |
use Rector\DowngradePhp74\Rector\ArrowFunction\ArrowFunctionToAnonymousFunctionRector; | |
use Rector\Set\ValueObject\LevelSetList; | |
use Rector\Set\ValueObject\SetList; | |
use Rector\Visibility\Rector\ClassMethod\ExplicitPublicClassMethodRector; | |
return static function (RectorConfig $rectorConfig): void { | |
$rectorConfig->sets([ | |
SetList::PHP_74, | |
LevelSetList::UP_TO_PHP_73, | |
// SetList::DEAD_CODE, | |
// SetList::PSR_4, | |
]); | |
// If the app uses tabs for idention | |
// $rectorConfig->indent("\t", 1); | |
$rectorConfig->skip([ | |
\Rector\Php73\Rector\FuncCall\JsonThrowOnErrorRector::class, | |
ArrowFunctionToAnonymousFunctionRector::class | |
]); | |
$services = $rectorConfig->services(); | |
$services->set(ArrowFunctionToAnonymousFunctionRector::class); | |
$services->set(ExplicitPublicClassMethodRector::class); | |
$services->set(CompleteDynamicPropertiesRector::class); | |
$rectorConfig->phpVersion(PhpVersion::PHP_74); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment