-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrector.php
More file actions
54 lines (43 loc) · 1.52 KB
/
Copy pathrector.php
File metadata and controls
54 lines (43 loc) · 1.52 KB
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
48
49
50
51
52
53
54
<?php
declare(strict_types=1);
use Rector\Caching\ValueObject\Storage\FileCacheStorage;
use Rector\CodingStyle\Rector\FuncCall\ClosureFromCallableToFirstClassCallableRector;
use Rector\Config\RectorConfig;
use Rector\Php74\Rector\Property\RestoreDefaultNullToNullableTypePropertyRector;
use Rector\Php81\Rector\Property\ReadOnlyPropertyRector;
use Rector\Php82\Rector\Class_\ReadOnlyClassRector;
use Rector\Set\ValueObject\LevelSetList;
use Rector\ValueObject\PhpVersion;
return static function (RectorConfig $rectorConfig): void {
$rectorConfig->sets([
LevelSetList::UP_TO_PHP_82,
]);
$rectorConfig->parallel();
$rectorConfig->cacheClass(FileCacheStorage::class);
if (is_dir('/tmp')) {
$rectorConfig->cacheDirectory('/tmp/rector');
}
$rectorConfig->paths([
__DIR__ . '/src/',
__DIR__ . '/tests/',
]);
$rectorConfig->autoloadPaths([
__DIR__ . '/vendor/autoload.php',
]);
$rectorConfig->bootstrapFiles([
__DIR__ . '/vendor/codeigniter4/framework/system/Test/bootstrap.php',
]);
if (is_file(__DIR__ . '/phpstan.neon.dist')) {
$rectorConfig->phpstanConfigs([
__DIR__ . '/phpstan.neon.dist',
]);
}
$rectorConfig->phpVersion(PhpVersion::PHP_82);
$rectorConfig->importNames();
$rectorConfig->skip([
ClosureFromCallableToFirstClassCallableRector::class,
ReadOnlyClassRector::class,
ReadOnlyPropertyRector::class,
RestoreDefaultNullToNullableTypePropertyRector::class,
]);
};