mirror of
https://github.com/rectorphp/rector.git
synced 2025-02-24 19:53:14 +01:00
f82fa3182c
[DeadCode] Make RemoveUnusedPrivatePropertyRector configurable to allow skip remove assign with side effect (#1948)
16 lines
920 B
PHP
16 lines
920 B
PHP
<?php
|
|
|
|
declare (strict_types=1);
|
|
namespace RectorPrefix20220320;
|
|
|
|
use Rector\PSR4\Composer\PSR4NamespaceMatcher;
|
|
use Rector\PSR4\Contract\PSR4AutoloadNamespaceMatcherInterface;
|
|
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
|
return static function (\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator $containerConfigurator) : void {
|
|
$services = $containerConfigurator->services();
|
|
$services->defaults()->public()->autowire()->autoconfigure();
|
|
// psr-4
|
|
$services->alias(\Rector\PSR4\Contract\PSR4AutoloadNamespaceMatcherInterface::class, \Rector\PSR4\Composer\PSR4NamespaceMatcher::class);
|
|
$services->load('Rector\\', __DIR__ . '/../rules')->exclude([__DIR__ . '/../rules/*/ValueObject/*', __DIR__ . '/../rules/*/Rector/*', __DIR__ . '/../rules/*/Contract/*', __DIR__ . '/../rules/*/Exception/*', __DIR__ . '/../rules/*/Enum/*']);
|
|
};
|