rector/e2e/applied-rule-change-docblock/rector.php
Tomas Votruba 8d92c466fd
[DX] Use RectorConfig in configs (#2063)
* use RectorConfig in configs

* update variable name

* remove extra spaces

* apply on configs

* apply on e2e

* update markdown files

* remove extra spaces
2022-04-12 13:46:07 +02:00

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);
};