diff options
author | Kate <26026535+provokateurin@users.noreply.github.com> | 2024-10-22 12:47:45 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-10-22 12:47:45 +0200 |
commit | 070adc1131fcd5476e4a93ebf28be6f409c5a992 (patch) | |
tree | 1e8e2238a22d544c370f1ac804426ed675c5eacf /build | |
parent | 582af10e0be1b22ebde0429b756f62107d8e8083 (diff) | |
parent | e8426996f59ab6dbf0c94adee8f410cbd572b11a (diff) | |
download | nextcloud-server-070adc1131fcd5476e4a93ebf28be6f409c5a992.tar.gz nextcloud-server-070adc1131fcd5476e4a93ebf28be6f409c5a992.zip |
Merge pull request #48790 from nextcloud/refactor/apps/constructor-property-promotion
Diffstat (limited to 'build')
-rw-r--r-- | build/psalm-baseline.xml | 22 | ||||
-rw-r--r-- | build/rector.php | 7 |
2 files changed, 6 insertions, 23 deletions
diff --git a/build/psalm-baseline.xml b/build/psalm-baseline.xml index c83074709ce..fbc5a4ac4fc 100644 --- a/build/psalm-baseline.xml +++ b/build/psalm-baseline.xml @@ -335,11 +335,6 @@ <code><![CDATA[$this->principalUri]]></code> </InvalidArgument> </file> - <file src="apps/dav/lib/CardDAV/Xml/Groups.php"> - <InvalidPropertyAssignmentValue> - <code><![CDATA[$groups]]></code> - </InvalidPropertyAssignmentValue> - </file> <file src="apps/dav/lib/Comments/CommentsPlugin.php"> <UndefinedFunction> <code><![CDATA[\Sabre\HTTP\toDate($value)]]></code> @@ -687,14 +682,6 @@ <code><![CDATA[new PrivateKeyMissingException('please try to log-out and log-in again', 0)]]></code> </TooManyArguments> </file> - <file src="apps/encryption/lib/Util.php"> - <LessSpecificReturnStatement> - <code><![CDATA[$this->files->getMount($path)->getStorage()]]></code> - </LessSpecificReturnStatement> - <MoreSpecificReturnType> - <code><![CDATA[\OC\Files\Storage\Storage|null]]></code> - </MoreSpecificReturnType> - </file> <file src="apps/federatedfilesharing/lib/Controller/RequestHandlerController.php"> <InvalidArgument> <code><![CDATA[$id]]></code> @@ -1247,15 +1234,6 @@ <code><![CDATA[bool]]></code> </InvalidReturnType> </file> - <file src="apps/workflowengine/lib/Service/RuleMatcher.php"> - <UndefinedInterfaceMethod> - <code><![CDATA[getAllConfiguredScopesForOperation]]></code> - <code><![CDATA[getChecks]]></code> - <code><![CDATA[getOperations]]></code> - <code><![CDATA[getOperations]]></code> - <code><![CDATA[isUserScopeEnabled]]></code> - </UndefinedInterfaceMethod> - </file> <file src="core/BackgroundJobs/CheckForUserCertificates.php"> <ParamNameMismatch> <code><![CDATA[$arguments]]></code> diff --git a/build/rector.php b/build/rector.php index db39fb4ce48..b6e46c1e53a 100644 --- a/build/rector.php +++ b/build/rector.php @@ -10,6 +10,7 @@ declare(strict_types=1); use PhpParser\Node; use Rector\CodingStyle\Contract\ClassNameImport\ClassNameImportSkipVoterInterface; use Rector\Config\RectorConfig; +use Rector\Php80\Rector\Class_\ClassPropertyAssignToConstructorPromotionRector; use Rector\StaticTypeMapper\ValueObject\Type\FullyQualifiedObjectType; use Rector\ValueObject\Application\File; @@ -67,7 +68,11 @@ $config = RectorConfig::configure() // uncomment to reach your current PHP version // ->withPhpSets() ->withImportNames(importShortClasses:false) - ->withTypeCoverageLevel(0); + ->withTypeCoverageLevel(0) + ->withConfiguredRule(ClassPropertyAssignToConstructorPromotionRector::class, [ + 'inline_public' => true, + 'rename_property' => true, + ]); $config->registerService(NextcloudNamespaceSkipVoter::class, tag:ClassNameImportSkipVoterInterface::class); |