-
Notifications
You must be signed in to change notification settings - Fork 942
/
Copy pathrector.php
31 lines (29 loc) · 1.18 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
<?php
use Rector\CodeQuality\Rector\ClassMethod\ExplicitReturnNullRector;
use Rector\CodeQuality\Rector\For_\ForRepeatedCountToOwnVariableRector;
use Rector\CodeQuality\Rector\If_\CombineIfRector;
use Rector\CodeQuality\Rector\If_\ExplicitBoolCompareRector;
use Rector\CodeQuality\Rector\If_\ShortenElseIfRector;
use Rector\Config\RectorConfig;
use Rector\DeadCode\Rector\If_\RemoveAlwaysTrueIfConditionRector;
use Rector\DeadCode\Rector\If_\RemoveDeadInstanceOfRector;
use Rector\TypeDeclaration\Rector\Property\TypedPropertyFromStrictConstructorRector;
use Rector\ValueObject\PhpVersion;
return RectorConfig::configure()
->withRules([
TypedPropertyFromStrictConstructorRector::class
])
->withSkip([
CombineIfRector::class,
ExplicitBoolCompareRector::class,
ForRepeatedCountToOwnVariableRector::class,
RemoveAlwaysTrueIfConditionRector::class => [
__DIR__ . '/src/Processors/ExpandEnums.php',
] ,
RemoveDeadInstanceOfRector::class => [
__DIR__ . '/src/Processors/ExpandEnums.php',
],
ShortenElseIfRector::class,
])
->withPreparedSets(true, true)
->withPhpVersion(PhpVersion::PHP_74);