Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[stable26] Rename numericStorageId to numericExternalStorageId in PersonalMount.php #38317

Merged
merged 1 commit into from
May 17, 2023
Merged
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
12 changes: 6 additions & 6 deletions apps/files_external/lib/Lib/PersonalMount.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ class PersonalMount extends ExternalMountPoint implements MoveableMount {
/** @var UserStoragesService */
protected $storagesService;

/** @var int */
protected $numericStorageId;
/** @var int id of the external storage (mount) (not the numeric id of the resulting storage!) */
protected $numericExternalStorageId;

/**
* @param UserStoragesService $storagesService
Expand All @@ -51,7 +51,7 @@ class PersonalMount extends ExternalMountPoint implements MoveableMount {
public function __construct(
UserStoragesService $storagesService,
StorageConfig $storageConfig,
$storageId,
$externalStorageId,

Check notice

Code scanning / Psalm

MissingParamType

Parameter $externalStorageId has no provided type
$storage,
$mountpoint,
$arguments = null,
Expand All @@ -61,7 +61,7 @@ public function __construct(
) {
parent::__construct($storageConfig, $storage, $mountpoint, $arguments, $loader, $mountOptions, $mountId);
$this->storagesService = $storagesService;
$this->numericStorageId = $storageId;
$this->numericExternalStorageId = $externalStorageId;
}

/**
Expand All @@ -71,7 +71,7 @@ public function __construct(
* @return bool
*/
public function moveMount($target) {
$storage = $this->storagesService->getStorage($this->numericStorageId);
$storage = $this->storagesService->getStorage($this->numericExternalStorageId);
// remove "/$user/files" prefix
$targetParts = explode('/', trim($target, '/'), 3);
$storage->setMountPoint($targetParts[2]);
Expand All @@ -86,7 +86,7 @@ public function moveMount($target) {
* @return bool
*/
public function removeMount() {
$this->storagesService->removeStorage($this->numericStorageId);
$this->storagesService->removeStorage($this->numericExternalStorageId);
return true;
}
}