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;
|
2020-09-28 23:42:20 +02:00
|
|
|
use Rector\Set\ValueObject\SetList;
|
|
|
|
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
|
|
|
|
|
|
|
return static function (ContainerConfigurator $containerConfigurator): void {
|
|
|
|
// get parameters
|
|
|
|
$parameters = $containerConfigurator->parameters();
|
|
|
|
|
|
|
|
// Define what rule sets will be applied
|
|
|
|
$parameters->set(Option::SETS, [
|
2020-10-11 12:40:45 +02:00
|
|
|
SetList::DEAD_CODE,
|
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);
|
|
|
|
};
|