-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathrector.php
47 lines (36 loc) · 1.32 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
42
43
44
45
46
47
<?php
declare(strict_types=1);
use Rector\CodeQuality\Rector\Class_\CompleteDynamicPropertiesRector;
use Rector\CodeQuality\Rector\Ternary\ArrayKeyExistsTernaryThenValueToCoalescingRector;
use Rector\Config\RectorConfig;
use Rector\Php80\Rector\Class_\ClassPropertyAssignToConstructorPromotionRector;
use Rector\PHPUnit\Set\PHPUnitSetList;
use Rector\Set\ValueObject\SetList;
use Rector\TypeDeclaration\Rector\ClassMethod\ReturnTypeFromStrictNativeCallRector;
use Rector\TypeDeclaration\Rector\ClassMethod\ReturnTypeFromStrictScalarReturnExprRector;
return static function (RectorConfig $rectorConfig): void {
$rectorConfig->paths([
__DIR__ . '/'
]);
$rectorConfig->skip([
__DIR__ . '/src/App/Migrations',
__DIR__ . '/vendor/*',
__DIR__ . '/src/proxy/*'
]);
$rectorConfig->rules([
ReturnTypeFromStrictNativeCallRector::class,
ReturnTypeFromStrictScalarReturnExprRector::class,
ArrayKeyExistsTernaryThenValueToCoalescingRector::class,
]);
$rectorConfig->skip([
ClassPropertyAssignToConstructorPromotionRector::class
]);
$rectorConfig->sets([
PHPUnitSetList::PHPUNIT_100,
SetList::PHP_83,
SetList::CODE_QUALITY,
//SetList::DEAD_CODE,
//SetList::NAMING,
SetList::TYPE_DECLARATION,
]);
};