2020-09-28 23:42:20 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
declare(strict_types=1);
|
|
|
|
|
|
|
|
use Rector\Core\Configuration\Option;
|
2020-10-31 18:00:11 +01:00
|
|
|
use Rector\Php74\Rector\Property\TypedPropertyRector;
|
2021-11-28 17:12:25 +00:00
|
|
|
use Rector\Set\ValueObject\LevelSetList;
|
2020-09-28 23:42:20 +02:00
|
|
|
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
|
|
|
|
|
|
|
return static function (ContainerConfigurator $containerConfigurator): void {
|
|
|
|
// get parameters
|
|
|
|
$parameters = $containerConfigurator->parameters();
|
2021-09-02 11:45:03 +00:00
|
|
|
$parameters->set(Option::PATHS, [
|
|
|
|
__DIR__ . '/src'
|
|
|
|
]);
|
2020-09-28 23:42:20 +02:00
|
|
|
|
|
|
|
// Define what rule sets will be applied
|
2021-11-28 17:12:25 +00:00
|
|
|
$containerConfigurator->import(LevelSetList::UP_TO_PHP_XY);
|
2020-09-28 23:42:20 +02:00
|
|
|
|
|
|
|
// get services (needed for register a single rule)
|
|
|
|
// $services = $containerConfigurator->services();
|
|
|
|
|
|
|
|
// register a single rule
|
|
|
|
// $services->set(TypedPropertyRector::class);
|
|
|
|
};
|