-
Notifications
You must be signed in to change notification settings - Fork 154
/
rector.php
29 lines (25 loc) · 1.3 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
<?php
declare(strict_types=1);
use Magento2\Rector\Src\ReplaceMbStrposNullLimit;
use Magento2\Rector\Src\ReplaceNewDateTimeNull;
use Rector\Config\RectorConfig;
use Rector\ValueObject\PhpVersion;
use Rector\Php80\Rector\Class_\StringableForToStringRector;
use Rector\Php80\Rector\ClassMethod\FinalPrivateToPrivateVisibilityRector;
use Rector\CodeQuality\Rector\ClassMethod\OptionalParametersAfterRequiredRector;
use Rector\Php80\Rector\ClassMethod\SetStateToStaticRector;
use Rector\Php81\Rector\FuncCall\Php81ResourceReturnToObjectRector;
use Magento2\Rector\Src\ReplacePregSplitNullLimit;
return static function (RectorConfig $rectorConfig): void {
$rectorConfig->phpVersion(PhpVersion::PHP_80);
$rectorConfig->phpVersion(PhpVersion::PHP_81);
// register a single rule
$rectorConfig->singleton(FinalPrivateToPrivateVisibilityRector::class);
$rectorConfig->singleton(OptionalParametersAfterRequiredRector::class);
$rectorConfig->singleton(SetStateToStaticRector::class);
$rectorConfig->singleton(StringableForToStringRector::class);
$rectorConfig->singleton(Php81ResourceReturnToObjectRector::class);
$rectorConfig->singleton(ReplacePregSplitNullLimit::class);
$rectorConfig->singleton(ReplaceMbStrposNullLimit::class);
$rectorConfig->singleton(ReplaceNewDateTimeNull::class);
};