Skip to content
Open
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
5 changes: 0 additions & 5 deletions lib/private/Files/Mount/Manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -111,18 +111,13 @@
throw new NotFoundException('No mount for path ' . $path . ' existing mounts (' . count($this->mounts) . '): ' . implode(',', array_keys($this->mounts)));
}

/**
* Find all mounts in $path
*
* @return IMountPoint[]
*/
#[\Override]
public function findIn(string $path): array {

Check failure on line 115 in lib/private/Files/Mount/Manager.php

View workflow job for this annotation

GitHub Actions / static-code-analysis

MoreSpecificReturnType

lib/private/Files/Mount/Manager.php:115:40: MoreSpecificReturnType: The declared return type 'list<OCP\Files\Mount\IMountPoint>' for OC\Files\Mount\Manager::findIn is more specific than the inferred return type 'array<array-key, OCP\Files\Mount\IMountPoint>' (see https://psalm.dev/070)
$this->setupManager->setupForPath($path, true);
$path = $this->formatPath($path);

if (isset($this->inPathCache[$path])) {
return $this->inPathCache[$path];

Check failure on line 120 in lib/private/Files/Mount/Manager.php

View workflow job for this annotation

GitHub Actions / static-code-analysis

LessSpecificReturnStatement

lib/private/Files/Mount/Manager.php:120:11: LessSpecificReturnStatement: The type 'array<array-key, OCP\Files\Mount\IMountPoint>' is more general than the declared return type 'list<OCP\Files\Mount\IMountPoint>' for OC\Files\Mount\Manager::findIn (see https://psalm.dev/129)
}

if (!$this->areMountsSorted) {
Expand Down
2 changes: 1 addition & 1 deletion lib/private/Files/Node/LazyFolder.php
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ public function getMount(string $mountPoint): IMountPoint {
}

/**
* @return IMountPoint[]
* @return list<IMountPoint>
*/
public function getMountsIn(string $mountPoint): array {
return $this->__call(__FUNCTION__, func_get_args());
Expand Down
4 changes: 0 additions & 4 deletions lib/private/Files/Node/Root.php
Original file line number Diff line number Diff line change
Expand Up @@ -136,10 +136,6 @@ public function getMount(string $mountPoint): IMountPoint {
return $this->mountManager->find($mountPoint);
}

/**
* @param string $mountPoint
* @return IMountPoint[]
*/
#[\Override]
public function getMountsIn(string $mountPoint): array {
return $this->mountManager->findIn($mountPoint);
Expand Down
4 changes: 0 additions & 4 deletions lib/private/Files/View.php
Original file line number Diff line number Diff line change
Expand Up @@ -1570,10 +1570,6 @@ public function getDirectoryContent(string $directory, ?string $mimeTypeFilter =
//add a folder for any mountpoint in this directory and add the sizes of other mountpoints to the folders
$mounts = Filesystem::getMountManager()->findIn($path);

// make sure nested mounts are sorted after their parent mounts
// otherwise doesn't propagate the etag across storage boundaries correctly
usort($mounts, static fn (IMountPoint $a, IMountPoint $b): int => $a->getMountPoint() <=> $b->getMountPoint());

$dirLength = strlen($path);
foreach ($mounts as $mount) {
$mountPoint = $mount->getMountPoint();
Expand Down
2 changes: 1 addition & 1 deletion lib/public/Files/IRootFolder.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public function getByIdInPath(int $id, string $path);
public function getFirstNodeByIdInPath(int $id, string $path): ?Node;

/**
* @return IMountPoint[]
* @return list<IMountPoint>
*
* @since 28.0.0
*/
Expand Down
2 changes: 1 addition & 1 deletion lib/public/Files/Mount/IMountManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public function find(string $path): ?IMountPoint;
* Find all mounts in $path
*
* @param string $path
* @return IMountPoint[]
* @return list<IMountPoint> Returns a sorted list of mount point
* @since 8.2.0
*/
public function findIn(string $path): array;
Expand Down
Loading