Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ public function __construct(
parent::__construct($timeFactory);
}

public function run($arguments) {
$offset = (int)$arguments['offset'];
$stopAt = (int)$arguments['stopAt'];
public function run($argument) {
$offset = (int)$argument['offset'];
$stopAt = (int)$argument['stopAt'];

$this->logger->info('Building calendar index (' . $offset . '/' . $stopAt . ')');

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ public function __construct(
parent::__construct($timeFactory);
}

public function run($arguments) {
$offset = $arguments['offset'];
$stopAt = $arguments['stopAt'];
public function run($argument) {
$offset = $argument['offset'];
$stopAt = $argument['stopAt'];

$this->logger->info('Indexing social profile data (' . $offset . '/' . $stopAt . ')');

Expand Down
33 changes: 0 additions & 33 deletions build/psalm-baseline.xml
Original file line number Diff line number Diff line change
Expand Up @@ -885,23 +885,13 @@
<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>
<code><![CDATA[getAppValue]]></code>
<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>
Expand Down Expand Up @@ -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>
Expand Down Expand Up @@ -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>
Expand Down
2 changes: 1 addition & 1 deletion core/BackgroundJobs/CheckForUserCertificates.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public function __construct(
/**
* Checks all user directories for old user uploaded certificates
*/
public function run($arguments): void {
public function run($argument): void {
$uploadList = [];
$this->userManager->callForSeenUsers(function (IUser $user) use (&$uploadList): void {
$userId = $user->getUID();
Expand Down
4 changes: 2 additions & 2 deletions lib/private/Repair/Owncloud/CleanPreviewsBackgroundJob.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ public function __construct(
parent::__construct($timeFactory);
}

public function run($arguments) {
$uid = $arguments['uid'];
public function run($argument): void {
$uid = $argument['uid'];
if (!$this->userManager->userExists($uid)) {
$this->logger->info('User no longer exists, skip user ' . $uid);
return;
Expand Down
2 changes: 1 addition & 1 deletion lib/private/Repair/Owncloud/MoveAvatarsBackgroundJob.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public function __construct(
}
}

public function run($arguments) {
public function run($argument) {
$this->logger->info('Started migrating avatars to AppData folder');
$this->moveAvatars();
$this->logger->info('All avatars migrated to AppData folder');
Expand Down
14 changes: 7 additions & 7 deletions lib/private/Repair/RepairInvalidShares.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public function getName() {
/**
* 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();

Expand All @@ -44,14 +44,14 @@ private function adjustFileSharePermissions(IOutput $out) {

$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();
Expand Down Expand Up @@ -80,16 +80,16 @@ private function removeSharesNonExistingParent(IOutput $out) {
}

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);
}
}
40 changes: 20 additions & 20 deletions lib/private/Repair/RepairMimeTypes.php
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ private function getMimeTypeVersion(): string {
*
* @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();

Expand All @@ -391,79 +391,79 @@ public function run(IOutput $out): void {
// 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) {
Expand Down
Loading