mirror of
https://github.com/rectorphp/rector.git
synced 2024-06-07 03:40:50 +00:00
8d92c466fd
* use RectorConfig in configs * update variable name * remove extra spaces * apply on configs * apply on e2e * update markdown files * remove extra spaces
25 lines
918 B
PHP
25 lines
918 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
use Rector\Config\RectorConfig;
|
|
use Rector\Core\Configuration\Option;
|
|
use Rector\DeadCode\Rector\Property\RemoveUselessVarTagRector;
|
|
use Rector\DowngradePhp80\Rector\Class_\DowngradeAttributeToAnnotationRector;
|
|
use Rector\DowngradePhp80\ValueObject\DowngradeAttributeToAnnotation;
|
|
use Rector\Renaming\Rector\Name\RenameClassRector;
|
|
|
|
return static function (RectorConfig $rectorConfig): void {
|
|
$parameters = $rectorConfig->parameters();
|
|
$parameters->set(Option::PATHS, [
|
|
__DIR__ . '/src',
|
|
]);
|
|
|
|
$services = $rectorConfig->services();
|
|
$services->set(RenameClassRector::class)
|
|
->configure(['DateTime' => 'DateTimeInterface']);
|
|
$services->set(DowngradeAttributeToAnnotationRector::class)
|
|
->configure([new DowngradeAttributeToAnnotation('Symfony\Component\Routing\Annotation\Route')]);
|
|
$services->set(RemoveUselessVarTagRector::class);
|
|
};
|