-
-
Notifications
You must be signed in to change notification settings - Fork 85
/
rector-ci.php
70 lines (62 loc) · 2.61 KB
/
rector-ci.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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
<?php
declare(strict_types=1);
use Rector\Config\RectorConfig;
use Rector\Core\Configuration\Option;
use Rector\DeadCode\Rector\Cast\RecastingRemovalRector;
use Rector\DeadCode\Rector\If_\RemoveAlwaysTrueIfConditionRector;
use Rector\DeadCode\Rector\Property\RemoveSetterOnlyPropertyAndMethodCallRector;
use Rector\DeadCode\Rector\Property\RemoveUnusedPrivatePropertyRector;
use Rector\DeadCode\Rector\Stmt\RemoveUnreachableStatementRector;
use Rector\PHPUnit\Set\PHPUnitSetList;
use Rector\Set\ValueObject\LevelSetList;
use Rector\Set\ValueObject\SetList;
use Ssch\TYPO3Rector\Set\Typo3SetList;
use Ssch\Typo3RectorTestingFramework\Set\NimutTestingFrameworkSetList;
return RectorConfig::configure()
->withPaths([
__DIR__ . '/Classes',
__DIR__ . '/Configuration',
__DIR__ . '/Tests'
])
->withSkip([
__DIR__ . '/Tests/Functional/Fixtures/Extensions/typo3_console/ext_emconf.php',
__DIR__ . '/Classes/Worker/CrawlerWorker.php',
__DIR__ . '/Classes/Command/ProcessQueueCommand.php',
__DIR__ . '/Classes/Controller/CrawlerController.php',
__DIR__ . '/Classes/Domain/Model/Reason.php',
__DIR__ . '/Tests/Functional/Api/CrawlerApiTest.php',
__DIR__ . '/Tests/Acceptance',
Rector\DeadCode\Rector\If_\RemoveDeadInstanceOfRector::class => null,
Rector\DeadCode\Rector\Assign\RemoveUnusedVariableAssignRector::class => [
__DIR__ . '/Classes/Domain/Repository/QueueRepository.php'
],
RemoveAlwaysTrueIfConditionRector::class => null,
RemoveUnreachableStatementRector::class => [
__DIR__ . '/Tests/Unit/CrawlStrategy/SubProcessExecutionStrategyTest.php'
],
RemoveUnusedPrivatePropertyRector::class => [
__DIR__ . '/Classes/Hooks/ProcessCleanUpHook.php'
],
RecastingRemovalRector::class => [
__DIR__ . '/Classes/Backend/RequestForm/LogRequestForm.php'
]
])
->withAutoloadPaths([
__DIR__ . '/Classes'
])
->withImportNames(false)
->withSets([
SetList::DEAD_CODE,
//SetList::CODE_QUALITY,
//SetList::CODING_STYLE,
LevelSetList::UP_TO_PHP_81,
PHPUnitSetList::PHPUNIT_90,
PHPUnitSetList::PHPUNIT_100,
])
->registerService(Typo3SetList::TYPO3_11)
->registerService(Typo3SetList::TYPO3_12)
->registerService(NimutTestingFrameworkSetList::class::NIMUT_TESTING_FRAMEWORK_TO_TYPO3_TESTING_FRAMEWORK);
/**return static function (RectorConfig $rectorConfig): void {
$services = $rectorConfig->services();
$services->set(RemoveUnusedPrivatePropertyRector::class);
};*/