-
Notifications
You must be signed in to change notification settings - Fork 19
/
rector.php
32 lines (29 loc) · 965 Bytes
/
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
<?php
/**
* SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
use Rector\Config\RectorConfig;
use Rector\DeadCode\Rector\StaticCall\RemoveParentCallWithoutParentRector;
use Rector\Set\ValueObject\SetList;
use Rector\TypeDeclaration\Rector\ClassMethod\ReturnTypeFromStrictTypedPropertyRector;
use Rector\TypeDeclaration\Rector\ClassMethod\ReturnUnionTypeRector;
use Rector\ValueObject\PhpVersion;
return function (RectorConfig $rectorConfig) {
$rectorConfig->paths([
__DIR__ . '/lib',
__DIR__ . '/tests',
]);
$rectorConfig->phpVersion(PhpVersion::PHP_80);
$rectorConfig->importNames();
$rectorConfig->indent(' ', 1);
$rectorConfig->sets([
SetList::PHP_74,
SetList::PHP_80,
]);
$rectorConfig->rule(ReturnTypeFromStrictTypedPropertyRector::class);
$rectorConfig->rule(ReturnUnionTypeRector::class);
$rectorConfig->skip([
RemoveParentCallWithoutParentRector::class,
]);
};