forked from spatie/holidays
-
Notifications
You must be signed in to change notification settings - Fork 0
/
rector.php
34 lines (31 loc) · 1.48 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
<?php
declare(strict_types=1);
use Rector\CodingStyle\Rector\ArrowFunction\StaticArrowFunctionRector;
use Rector\CodingStyle\Rector\Assign\SplitDoubleAssignRector;
use Rector\CodingStyle\Rector\Catch_\CatchExceptionNameMatchingTypeRector;
use Rector\CodingStyle\Rector\Closure\StaticClosureRector;
use Rector\CodingStyle\Rector\Encapsed\EncapsedStringsToSprintfRector;
use Rector\CodingStyle\Rector\If_\NullableCompareToNullRector;
use Rector\CodingStyle\Rector\PostInc\PostIncDecToPreIncDecRector;
use Rector\Config\RectorConfig;
use Rector\Php74\Rector\Closure\ClosureToArrowFunctionRector;
use Rector\Php81\Rector\FuncCall\NullToStrictStringFuncCallArgRector;
use Rector\TypeDeclaration\Rector\ClassMethod\ReturnNeverTypeRector;
use Rector\TypeDeclaration\Rector\Closure\AddClosureVoidReturnTypeWhereNoReturnRector;
return RectorConfig::configure()
->withPaths(['src'])
->withPhpSets(php81: true)
->withPreparedSets(deadCode: true, codingStyle: true, typeDeclarations: true)
->withSkip([
NullToStrictStringFuncCallArgRector::class,
ClosureToArrowFunctionRector::class,
ReturnNeverTypeRector::class,
AddClosureVoidReturnTypeWhereNoReturnRector::class,
StaticClosureRector::class,
StaticArrowFunctionRector::class,
SplitDoubleAssignRector::class,
NullableCompareToNullRector::class,
EncapsedStringsToSprintfRector::class,
CatchExceptionNameMatchingTypeRector::class,
PostIncDecToPreIncDecRector::class,
]);