forked from pear/MDB2
-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathrector.php
41 lines (38 loc) · 1.45 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
<?php
declare(strict_types=1);
use Rector\Config\RectorConfig;
use Rector\Php80\Rector\Catch_\RemoveUnusedVariableInCatchRector;
use Rector\Php80\Rector\Class_\ClassPropertyAssignToConstructorPromotionRector;
use Rector\Php80\Rector\FunctionLike\MixedTypeRector;
use Rector\Php81\Rector\FuncCall\NullToStrictStringFuncCallArgRector;
return RectorConfig::configure()
// Set the correct paths to all the PHP files in your project
->withPaths([
__DIR__ . '/MDB2',
__DIR__ . '/MDB2.php',
__DIR__ . '/tests',
])
->withFileExtensions([
'php',
'inc',
])
// Choose the correct PHP version for your project
->withPhpSets(php82: true)
->withRules([
// any additional rules can be added here
// see https://getrector.com/find-rule
])
->withSkip([
// any rules that are part of the PHP set but that you want
// to skip can be listed here. The following are common ones
// that introduce a lot of changes to legacy code bases.
// For new projects, you should probably not skip anything.
ClassPropertyAssignToConstructorPromotionRector::class,
MixedTypeRector::class,
NullToStrictStringFuncCallArgRector::class,
RemoveUnusedVariableInCatchRector::class,
])
// See https://getrector.com/documentation/integration-to-new-project
// for other configuration settings
->withTypeCoverageLevel(1)
->withDeadCodeLevel(0);