From 3cb5605947344fcf68533e8a1ec75cc68e8b53be Mon Sep 17 00:00:00 2001 From: Michel Roux Date: Tue, 12 Nov 2024 10:19:22 +0100 Subject: [PATCH] add nextcloud/rector --- composer.json | 1 + rector.php | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 62d70aa..1e1c721 100644 --- a/composer.json +++ b/composer.json @@ -25,6 +25,7 @@ "nextcloud/ocp": "^30.0.2", "roave/security-advisories": "dev-latest", "nextcloud/coding-standard": "^1.3.2", + "nextcloud/rector": "^0.2.1", "rector/rector": "^1.2.10", "vimeo/psalm": "^5.26.1" }, diff --git a/rector.php b/rector.php index 881c2f3..b7d34ea 100644 --- a/rector.php +++ b/rector.php @@ -2,13 +2,18 @@ declare(strict_types=1); +use Nextcloud\Rector\Set\NextcloudSets; use Rector\Config\RectorConfig; return RectorConfig::configure() ->withPaths([ + __DIR__.'/appinfo', __DIR__.'/lib', ]) - ->withPhpSets(php80: true) + ->withPhpSets(php81: true) + ->withSets([ + NextcloudSets::NEXTCLOUD_27, + ]) ->withPreparedSets( deadCode: true, codeQuality: true,