mirror of
https://github.com/rectorphp/rector.git
synced 2025-01-17 21:38:22 +01:00
e152aa2ab8
2ea6e90e10
add paths to rector init
26 lines
776 B
Plaintext
26 lines
776 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();
|
|
$parameters->set(Option::PATHS, [
|
|
__DIR__ . '/src'
|
|
]);
|
|
|
|
// Define what rule sets will be applied
|
|
$containerConfigurator->import(SetList::CODE_QUALITY);
|
|
|
|
// get services (needed for register a single rule)
|
|
// $services = $containerConfigurator->services();
|
|
|
|
// register a single rule
|
|
// $services->set(TypedPropertyRector::class);
|
|
};
|