At the root of you project you can add a rector.php file to add the configuration of Rector. In the parameters you can add a section setParameters with the options SKIP. This allows you this skip some rules for Rector on your project. See configuration below.
parameters();
$parameters->set(Option::PHP_VERSION_FEATURES, PhpVersion::PHP_74);
// paths to refactor; solid alternative to CLI arguments
$parameters->set(Option::PATHS, [
]);
// here we can define, what sets of rules will be applied
$containerConfigurator->import(SetList::DEAD_CODE);
$containerConfigurator->import(SetList::CODE_QUALITY);
$containerConfigurator->import(SetList::TYPE_DECLARATION);
$containerConfigurator->import(SetList::TYPE_DECLARATION_STRICT);
$containerConfigurator->import(SetList::PHP_52);
$containerConfigurator->import(SetList::PHP_53);
$containerConfigurator->import(SetList::PHP_54);
$containerConfigurator->import(SetList::PHP_55);
$containerConfigurator->import(SetList::PHP_56);
$containerConfigurator->import(SetList::PHP_70);
$containerConfigurator->import(SetList::PHP_71);
$containerConfigurator->import(SetList::PHP_72);
$containerConfigurator->import(SetList::PHP_73);
$containerConfigurator->import(SetList::PHP_74);
$parameters->set(Option::SKIP, [
__DIR__ . '/module/Application/src/Entity',
RemoveUnusedPrivateMethodRector::class => [
__DIR__ . '/module/Nexus/src/*Task.php',
],
RemoveUnreachableStatementRector::class => [
__DIR__ . '/module/Spaceship/src/StarforceController.php',
__DIR__ . '/module/Spaceship/src/JetTask.php',
],
RemoveCodeAfterReturnRector::class => [
__DIR__ . '/module/Hatch/src/Command.php',
],
RemoveDeadReturnRector::class => [
__DIR__ . '/module/Forgery/src/PaperTask.php',
],
RemoveUnusedAssignVariableRector::class,
RemoveConcatAutocastRector::class,
RemoveDeadInstanceOfRector::class,
TypedPropertyRector::class,
CountOnNullRector::class,
ArraySpreadInsteadOfArrayMergeRector::class,
UseIdenticalOverEqualWithSameTypeRector::class,
]);
};