-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrector.php
27 lines (25 loc) · 960 Bytes
/
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
<?php
use Rector\Arguments\Rector\FuncCall\FunctionArgumentDefaultValueReplacerRector;
use Rector\Arguments\ValueObject\ReplaceFuncCallArgumentDefaultValue;
use Rector\Config\RectorConfig;
use Rector\Renaming\Rector\Name\RenameClassRector;
use Rector\Set\ValueObject\DowngradeLevelSetList;
return static function (RectorConfig $rectorConfig): void {
$rectorConfig->parallel();
$rectorConfig->importNames();
$rectorConfig->paths([__DIR__ . '/app']);
$rectorConfig->sets([
DowngradeLevelSetList::DOWN_TO_PHP_70,
]);
$rectorConfig->ruleWithConfiguration(RenameClassRector::class, [
'WordPressdotorg\Plugin_Directory\Markdown' => 'Syntatis\WPPluginReadMeParser\Markdown',
]);
$rectorConfig->ruleWithConfiguration(FunctionArgumentDefaultValueReplacerRector::class, [
new ReplaceFuncCallArgumentDefaultValue(
'class_exists',
0,
'\WordPressdotorg\Plugin_Directory\Markdown',
'\Syntatis\WPPluginReadMeParser\Markdown'
),
]);
};