-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrector.php
More file actions
56 lines (47 loc) · 1.56 KB
/
Copy pathrector.php
File metadata and controls
56 lines (47 loc) · 1.56 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
55
56
<?php
declare(strict_types=1);
require_once __DIR__ . '/../../autoload.php';
use Rector\Config\RectorConfig;
use Rector\Renaming\Rector\Name\RenameClassRector;
/**
* Minimum PHP Version required for current Rector rules
*
* @note Also adjust the PhpSets in the RectorConfig::configure() method accordingly
*/
$minPhpVersion = '8.2';
/**
* Minimum HumHub Version required for current Rector rules
*/
$minHumHubVersion = '1.18';
\HumHubUtils\UpdatePhpVersion::increaseVersion($minPhpVersion);
\HumHubUtils\UpdateHumHubMinVersion::increaseVersion($minHumHubVersion);
return RectorConfig::configure()
->withPaths([
getcwd(),
])
->withAutoloadPaths([
getcwd() . '/../humhub',
getcwd() . '/../humhub/vendor/autoload.php',
])
->withSkip([
\Rector\Php81\Rector\Array_\ArrayToFirstClassCallableRector::class,
\Rector\TypeDeclaration\Rector\ClassMethod\ReturnNeverTypeRector::class,
\Rector\DeadCode\Rector\StaticCall\RemoveParentCallWithoutParentRector::class,
\Rector\CodingStyle\Rector\FuncCall\FunctionFirstClassCallableRector::class,
getcwd() . '/vendor',
getcwd() . '/messages',
getcwd() . '/../humhub',
])
->withPhpSets(php82: true)
->withTypeCoverageLevel(0)
->withDeadCodeLevel(0)
->withCodeQualityLevel(0)
->withRules([
\HumHubUtils\RectorRules\ForceExplicitNullableParamRector::class,
])
->withConfiguredRule(
RenameClassRector::class,
[
//'OldNamespace\\OldClass' => 'NewNamespace\\NewClass',
],
);