rector/rector.php.dist
Petr Kessler 2c5693c8cf
rector.php.dist: added missing use for commented rule (#4524)
In the example of single rule registration there is a class which is unfortunatelly missing amongst use statements - simply uncommenting the line wouldn't work.
2020-10-31 18:00:11 +01:00

25 lines
719 B
Plaintext

<?php
declare(strict_types=1);
use Rector\Core\Configuration\Option;
use Rector\Php74\Rector\Property\TypedPropertyRector;
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, [
SetList::DEAD_CODE,
]);
// get services (needed for register a single rule)
// $services = $containerConfigurator->services();
// register a single rule
// $services->set(TypedPropertyRector::class);
};