forked from mautic/mautic
-
Notifications
You must be signed in to change notification settings - Fork 1
/
rector.php
47 lines (40 loc) · 1.58 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
38
39
40
41
42
43
44
45
46
47
<?php
declare(strict_types=1);
use Rector\Core\Configuration\Option;
use Rector\DeadCode\Rector\BooleanAnd\RemoveAndTrueRector;
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
return static function (ContainerConfigurator $containerConfigurator): void {
// here we can define, what sets of rules will be applied
$parameters = $containerConfigurator->parameters();
// Define what rule sets will be applied
// $containerConfigurator->import(SetList::DEAD_CODE);
$parameters->set(
Option::PATHS,
[
__DIR__.'/app/bundles',
__DIR__.'/plugins',
]
);
$parameters->set(
Option::SKIP,
[
__DIR__.'/*/test/*',
__DIR__.'/*/tests/*',
__DIR__.'/*/Test/*',
__DIR__.'/*/Tests/*',
__DIR__.'/*/InstallFixtures/*',
__DIR__.'/*/Fixtures/*',
__DIR__.'/*.html.php',
__DIR__.'/*.less.php',
__DIR__.'/*.inc.php',
__DIR__.'/*.js.php',
__DIR__.'/app/bundles/LeadBundle/Entity/LeadField.php',
__DIR__.'/app/bundles/WebhookBundle/Entity/Webhook.php',
__DIR__.'/app/bundles/UserBundle/Entity/UserToken.php',
__DIR__.'/app/bundles/EmailBundle/Entity/EmailReplyRepository.php',
]
);
$services = $containerConfigurator->services();
$services->set(RemoveAndTrueRector::class);
// $services->set(RemoveAlwaysTrueIfConditionRector::class); // 41 files would have changed (we should have a separate PR to enable this)
};