forked from mautic/mautic
-
Notifications
You must be signed in to change notification settings - Fork 0
/
rector.php
43 lines (34 loc) · 1.55 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
<?php
declare(strict_types=1);
use Rector\Caching\ValueObject\Storage\FileCacheStorage;
return static function (Rector\Config\RectorConfig $rectorConfig): void {
$rectorConfig->paths([__DIR__.'/app/bundles', __DIR__.'/plugins']);
$rectorConfig->skip(
[
__DIR__.'/*/test/*',
__DIR__.'/*/tests/*',
__DIR__.'/*/Test/*',
__DIR__.'/*/Tests/*',
__DIR__.'/*.html.php',
__DIR__.'/*.less.php',
__DIR__.'/*.inc.php',
__DIR__.'/*.js.php',
]
);
$rectorConfig->parallel();
$rectorConfig->symfonyContainerXml(__DIR__.'/var/cache/test/appAppKernelTestDebugContainer.xml');
$rectorConfig->cacheClass(FileCacheStorage::class);
$rectorConfig->cacheDirectory(__DIR__.'./var/cache/rector');
// Define what rule sets will be applied
$rectorConfig->sets([
\Rector\Symfony\Set\SymfonySetList::SYMFONY_40,
\Rector\Symfony\Set\SymfonySetList::SYMFONY_41,
// @todo implement the whole set. Start rule by rule below.
// \Rector\Set\ValueObject\SetList::DEAD_CODE
]);
// Define what signle rules will be applied
$rectorConfig->rule(\Rector\DeadCode\Rector\BooleanAnd\RemoveAndTrueRector::class);
$rectorConfig->rule(\Rector\DeadCode\Rector\Stmt\RemoveUnreachableStatementRector::class);
$rectorConfig->rule(\Rector\DeadCode\Rector\ClassConst\RemoveUnusedPrivateClassConstantRector::class);
$rectorConfig->rule(\Rector\DeadCode\Rector\ClassMethod\RemoveUnusedPrivateMethodParameterRector::class);
};