mirror of
https://github.com/nextcloud/server.git
synced 2026-04-22 14:50:17 -04:00
fix(psalm): Fix ParamNameMismatch with IRepairStep::run
Signed-off-by: Carl Schwan <carl.schwan@nextcloud.com>
This commit is contained in:
parent
ef5edb6801
commit
76dc41ea18
3 changed files with 27 additions and 60 deletions
|
|
@ -885,11 +885,6 @@
|
|||
<code><![CDATA[setAppValue]]></code>
|
||||
</DeprecatedMethod>
|
||||
</file>
|
||||
<file src="apps/dav/lib/Migration/BuildCalendarSearchIndexBackgroundJob.php">
|
||||
<ParamNameMismatch>
|
||||
<code><![CDATA[$arguments]]></code>
|
||||
</ParamNameMismatch>
|
||||
</file>
|
||||
<file src="apps/dav/lib/Migration/BuildSocialSearchIndex.php">
|
||||
<DeprecatedMethod>
|
||||
<code><![CDATA[execute]]></code>
|
||||
|
|
@ -897,11 +892,6 @@
|
|||
<code><![CDATA[setAppValue]]></code>
|
||||
</DeprecatedMethod>
|
||||
</file>
|
||||
<file src="apps/dav/lib/Migration/BuildSocialSearchIndexBackgroundJob.php">
|
||||
<ParamNameMismatch>
|
||||
<code><![CDATA[$arguments]]></code>
|
||||
</ParamNameMismatch>
|
||||
</file>
|
||||
<file src="apps/dav/lib/Migration/ChunkCleanup.php">
|
||||
<DeprecatedMethod>
|
||||
<code><![CDATA[getAppValue]]></code>
|
||||
|
|
@ -2884,9 +2874,6 @@
|
|||
<code><![CDATA[deleteAppValue]]></code>
|
||||
<code><![CDATA[setAppValue]]></code>
|
||||
</DeprecatedMethod>
|
||||
<ParamNameMismatch>
|
||||
<code><![CDATA[$arguments]]></code>
|
||||
</ParamNameMismatch>
|
||||
</file>
|
||||
<file src="core/Command/App/ListApps.php">
|
||||
<LessSpecificImplementedReturnType>
|
||||
|
|
@ -4137,31 +4124,11 @@
|
|||
<code><![CDATA[false]]></code>
|
||||
</InvalidArgument>
|
||||
</file>
|
||||
<file src="lib/private/Repair/Owncloud/CleanPreviewsBackgroundJob.php">
|
||||
<ParamNameMismatch>
|
||||
<code><![CDATA[$arguments]]></code>
|
||||
</ParamNameMismatch>
|
||||
</file>
|
||||
<file src="lib/private/Repair/Owncloud/MoveAvatarsBackgroundJob.php">
|
||||
<ParamNameMismatch>
|
||||
<code><![CDATA[$arguments]]></code>
|
||||
</ParamNameMismatch>
|
||||
</file>
|
||||
<file src="lib/private/Repair/RemoveLinkShares.php">
|
||||
<InvalidPropertyAssignmentValue>
|
||||
<code><![CDATA[$this->userToNotify]]></code>
|
||||
</InvalidPropertyAssignmentValue>
|
||||
</file>
|
||||
<file src="lib/private/Repair/RepairInvalidShares.php">
|
||||
<ParamNameMismatch>
|
||||
<code><![CDATA[$out]]></code>
|
||||
</ParamNameMismatch>
|
||||
</file>
|
||||
<file src="lib/private/Repair/RepairMimeTypes.php">
|
||||
<ParamNameMismatch>
|
||||
<code><![CDATA[$out]]></code>
|
||||
</ParamNameMismatch>
|
||||
</file>
|
||||
<file src="lib/private/Route/Router.php">
|
||||
<InvalidNullableReturnType>
|
||||
<code><![CDATA[string]]></code>
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ class RepairInvalidShares implements IRepairStep {
|
|||
/**
|
||||
* Adjust file share permissions
|
||||
*/
|
||||
private function adjustFileSharePermissions(IOutput $out) {
|
||||
private function adjustFileSharePermissions(IOutput $output): void {
|
||||
$mask = \OCP\Constants::PERMISSION_READ | \OCP\Constants::PERMISSION_UPDATE | \OCP\Constants::PERMISSION_SHARE;
|
||||
$builder = $this->connection->getQueryBuilder();
|
||||
|
||||
|
|
@ -44,14 +44,14 @@ class RepairInvalidShares implements IRepairStep {
|
|||
|
||||
$updatedEntries = $builder->executeStatement();
|
||||
if ($updatedEntries > 0) {
|
||||
$out->info('Fixed file share permissions for ' . $updatedEntries . ' shares');
|
||||
$output->info('Fixed file share permissions for ' . $updatedEntries . ' shares');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove shares where the parent share does not exist anymore
|
||||
*/
|
||||
private function removeSharesNonExistingParent(IOutput $out) {
|
||||
private function removeSharesNonExistingParent(IOutput $output): void {
|
||||
$deletedEntries = 0;
|
||||
|
||||
$query = $this->connection->getQueryBuilder();
|
||||
|
|
@ -80,16 +80,16 @@ class RepairInvalidShares implements IRepairStep {
|
|||
}
|
||||
|
||||
if ($deletedEntries) {
|
||||
$out->info('Removed ' . $deletedEntries . ' shares where the parent did not exist');
|
||||
$output->info('Removed ' . $deletedEntries . ' shares where the parent did not exist');
|
||||
}
|
||||
}
|
||||
|
||||
public function run(IOutput $out) {
|
||||
public function run(IOutput $output) {
|
||||
$ocVersionFromBeforeUpdate = $this->config->getSystemValueString('version', '0.0.0');
|
||||
if (version_compare($ocVersionFromBeforeUpdate, '12.0.0.11', '<')) {
|
||||
$this->adjustFileSharePermissions($out);
|
||||
$this->adjustFileSharePermissions($output);
|
||||
}
|
||||
|
||||
$this->removeSharesNonExistingParent($out);
|
||||
$this->removeSharesNonExistingParent($output);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -382,7 +382,7 @@ class RepairMimeTypes implements IRepairStep {
|
|||
*
|
||||
* @throws Exception
|
||||
*/
|
||||
public function run(IOutput $out): void {
|
||||
public function run(IOutput $output): void {
|
||||
$serverVersion = $this->config->getSystemValueString('version', '0.0.0');
|
||||
$mimeTypeVersion = $this->getMimeTypeVersion();
|
||||
|
||||
|
|
@ -391,79 +391,79 @@ class RepairMimeTypes implements IRepairStep {
|
|||
// PLEASE ALSO KEEP THE LIST SORTED BY VERSION NUMBER
|
||||
|
||||
if (version_compare($mimeTypeVersion, '12.0.0.14', '<') && $this->introduceImageTypes()) {
|
||||
$out->info('Fixed image mime types');
|
||||
$output->info('Fixed image mime types');
|
||||
}
|
||||
|
||||
if (version_compare($mimeTypeVersion, '12.0.0.13', '<') && $this->introduceWindowsProgramTypes()) {
|
||||
$out->info('Fixed windows program mime types');
|
||||
$output->info('Fixed windows program mime types');
|
||||
}
|
||||
|
||||
if (version_compare($mimeTypeVersion, '13.0.0.0', '<') && $this->introduceLocationTypes()) {
|
||||
$out->info('Fixed geospatial mime types');
|
||||
$output->info('Fixed geospatial mime types');
|
||||
}
|
||||
|
||||
if (version_compare($mimeTypeVersion, '13.0.0.3', '<') && $this->introduceInternetShortcutTypes()) {
|
||||
$out->info('Fixed internet-shortcut mime types');
|
||||
$output->info('Fixed internet-shortcut mime types');
|
||||
}
|
||||
|
||||
if (version_compare($mimeTypeVersion, '13.0.0.6', '<') && $this->introduceStreamingTypes()) {
|
||||
$out->info('Fixed streaming mime types');
|
||||
$output->info('Fixed streaming mime types');
|
||||
}
|
||||
|
||||
if (version_compare($mimeTypeVersion, '14.0.0.8', '<') && $this->introduceVisioTypes()) {
|
||||
$out->info('Fixed visio mime types');
|
||||
$output->info('Fixed visio mime types');
|
||||
}
|
||||
|
||||
if (version_compare($mimeTypeVersion, '14.0.0.10', '<') && $this->introduceComicbookTypes()) {
|
||||
$out->info('Fixed comicbook mime types');
|
||||
$output->info('Fixed comicbook mime types');
|
||||
}
|
||||
|
||||
if (version_compare($mimeTypeVersion, '20.0.0.5', '<') && $this->introduceOpenDocumentTemplates()) {
|
||||
$out->info('Fixed OpenDocument template mime types');
|
||||
$output->info('Fixed OpenDocument template mime types');
|
||||
}
|
||||
|
||||
if (version_compare($mimeTypeVersion, '21.0.0.7', '<') && $this->introduceOrgModeType()) {
|
||||
$out->info('Fixed orgmode mime types');
|
||||
$output->info('Fixed orgmode mime types');
|
||||
}
|
||||
|
||||
if (version_compare($mimeTypeVersion, '23.0.0.2', '<') && $this->introduceFlatOpenDocumentType()) {
|
||||
$out->info('Fixed Flat OpenDocument mime types');
|
||||
$output->info('Fixed Flat OpenDocument mime types');
|
||||
}
|
||||
|
||||
if (version_compare($mimeTypeVersion, '25.0.0.2', '<') && $this->introduceOnlyofficeFormType()) {
|
||||
$out->info('Fixed ONLYOFFICE Forms OpenXML mime types');
|
||||
$output->info('Fixed ONLYOFFICE Forms OpenXML mime types');
|
||||
}
|
||||
|
||||
if (version_compare($mimeTypeVersion, '26.0.0.1', '<') && $this->introduceAsciidocType()) {
|
||||
$out->info('Fixed AsciiDoc mime types');
|
||||
$output->info('Fixed AsciiDoc mime types');
|
||||
}
|
||||
|
||||
if (version_compare($mimeTypeVersion, '28.0.0.5', '<') && $this->introduceEnhancedMetafileFormatType()) {
|
||||
$out->info('Fixed Enhanced Metafile Format mime types');
|
||||
$output->info('Fixed Enhanced Metafile Format mime types');
|
||||
}
|
||||
|
||||
if (version_compare($mimeTypeVersion, '29.0.0.2', '<') && $this->introduceEmlAndMsgFormatType()) {
|
||||
$out->info('Fixed eml and msg mime type');
|
||||
$output->info('Fixed eml and msg mime type');
|
||||
}
|
||||
|
||||
if (version_compare($mimeTypeVersion, '29.0.0.6', '<') && $this->introduceAacAudioType()) {
|
||||
$out->info('Fixed aac mime type');
|
||||
$output->info('Fixed aac mime type');
|
||||
}
|
||||
|
||||
if (version_compare($mimeTypeVersion, '29.0.0.10', '<') && $this->introduceReStructuredTextFormatType()) {
|
||||
$out->info('Fixed ReStructured Text mime type');
|
||||
$output->info('Fixed ReStructured Text mime type');
|
||||
}
|
||||
|
||||
if (version_compare($mimeTypeVersion, '30.0.0.0', '<') && $this->introduceExcalidrawType()) {
|
||||
$out->info('Fixed Excalidraw mime type');
|
||||
$output->info('Fixed Excalidraw mime type');
|
||||
}
|
||||
|
||||
if (version_compare($mimeTypeVersion, '31.0.0.0', '<') && $this->introduceZstType()) {
|
||||
$out->info('Fixed zst mime type');
|
||||
$output->info('Fixed zst mime type');
|
||||
}
|
||||
|
||||
if (version_compare($mimeTypeVersion, '32.0.0.0', '<') && $this->introduceMusicxmlType()) {
|
||||
$out->info('Fixed musicxml mime type');
|
||||
$output->info('Fixed musicxml mime type');
|
||||
}
|
||||
|
||||
if (!$this->dryRun) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue