rector/templates/rector.php.dist

26 lines
786 B
Plaintext
Raw Normal View History

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