forked from TomasVotruba/unused-public
-
Notifications
You must be signed in to change notification settings - Fork 0
/
rector.php
44 lines (36 loc) · 1.22 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
<?php
declare(strict_types=1);
use Rector\CodingStyle\Rector\ClassConst\VarConstantCommentRector;
use Rector\Config\RectorConfig;
use Rector\Set\ValueObject\LevelSetList;
use Rector\Set\ValueObject\SetList;
return static function (RectorConfig $rectorConfig): void {
$rectorConfig->paths([
__DIR__ . '/src',
__DIR__ . '/tests',
]);
$rectorConfig->importNames();
$rectorConfig->sets([
\Rector\PHPUnit\Set\PHPUnitSetList::PHPUNIT_100,
LevelSetList::UP_TO_PHP_81,
SetList::TYPE_DECLARATION,
SetList::PRIVATIZATION,
SetList::NAMING,
SetList::DEAD_CODE,
SetList::CODE_QUALITY,
SetList::CODING_STYLE,
]);
$rectorConfig->ruleWithConfiguration(\Rector\Php55\Rector\String_\StringClassNameToClassConstantRector::class, [
'Twig\Extension\ExtensionInterface',
'PHPUnit\Framework\TestCase',
'Symfony\Bundle\FrameworkBundle\Controller\Controller',
'Symfony\Component\EventDispatcher\EventSubscriberInterface',
]);
$rectorConfig->skip([
'*/Fixture/*',
'*/Source/*',
VarConstantCommentRector::class => [
__DIR__ . '/src/PublicClassMethodMatcher.php',
],
]);
};