-
-
Notifications
You must be signed in to change notification settings - Fork 88
/
Copy pathrector.php
37 lines (29 loc) · 1.27 KB
/
rector.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<?php
declare(strict_types=1);
use Rector\Core\Configuration\Option;
use Rector\DeadCode\Rector\ClassMethod\RemoveUnusedPrivateMethodRector;
use Rector\DeadCode\Rector\ClassMethod\RemoveUnusedPromotedPropertyRector;
use Rector\DeadCode\Rector\Property\RemoveUnusedPrivatePropertyRector;
use Rector\Php71\Rector\FuncCall\CountOnNullRector;
use Rector\Set\ValueObject\LevelSetList;
use Rector\Set\ValueObject\SetList;
use Spiral\Boot\Bootloader\ConfigurationBootloader;
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
return static function (ContainerConfigurator $containerConfigurator): void {
$parameters = $containerConfigurator->parameters();
$parameters->set(Option::PATHS, [
__DIR__ . '/src/*/src',
]);
$parameters->set(Option::SKIP, [
CountOnNullRector::class,
// for PHP 8
RemoveUnusedPromotedPropertyRector::class,
// buggy when remove private property, but filled by construct in the middle of parameter
RemoveUnusedPrivatePropertyRector::class,
RemoveUnusedPrivateMethodRector::class => [
ConfigurationBootloader::class,
],
]);
$containerConfigurator->import(LevelSetList::UP_TO_PHP_72);
$containerConfigurator->import(SetList::DEAD_CODE);
};