forked from polylang/polylang
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrector.php
More file actions
41 lines (38 loc) · 1.06 KB
/
rector.php
File metadata and controls
41 lines (38 loc) · 1.06 KB
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
<?php
declare(strict_types=1);
use Rector\Config\RectorConfig;
use Rector\Set\ValueObject\LevelSetList;
use Rector\Php54\Rector\Array_\LongArrayToShortArrayRector;
use Rector\Php55\Rector\String_\StringClassNameToClassConstantRector;
use Rector\Php71\Rector\List_\ListToArrayDestructRector;
return RectorConfig::configure()
->withPaths(
[
__DIR__ . '/admin',
__DIR__ . '/frontend',
__DIR__ . '/include',
__DIR__ . '/install',
__DIR__ . '/integrations',
__DIR__ . '/modules',
__DIR__ . '/settings',
__DIR__ . '/tests',
__DIR__ . '/polylang.php',
__DIR__ . '/uninstall.php',
]
)
->withSets(
[
LevelSetList::UP_TO_PHP_72,
]
)
->withSkip(
[
LongArrayToShortArrayRector::class,
ListToArrayDestructRector::class,
__DIR__ . '/install/plugin-updater.php',
StringClassNameToClassConstantRector::class => [ // Ignoring this allows to silence a warning from PHPUnit.
__DIR__ . '/tests/phpunit/tests/Options/Options/test-OffsetSet.php',
__DIR__ . '/tests/phpunit/tests/Options/Options/test-OffsetUnset.php',
],
]
);