aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--build/psalm-baseline.xml4
-rw-r--r--lib/private/Files/Node/Folder.php13
-rw-r--r--lib/private/Files/Node/LazyFolder.php6
-rw-r--r--lib/private/Files/Node/Root.php6
-rw-r--r--lib/public/Files/Folder.php1
5 files changed, 2 insertions, 28 deletions
diff --git a/build/psalm-baseline.xml b/build/psalm-baseline.xml
index 8f8fb6e3d5e..a143c6188a1 100644
--- a/build/psalm-baseline.xml
+++ b/build/psalm-baseline.xml
@@ -1976,7 +1976,6 @@
</file>
<file src="lib/private/Files/Node/Folder.php">
<LessSpecificReturnStatement>
- <code><![CDATA[$this->root->get($this->getFullPath($path))]]></code>
<code><![CDATA[array_map(function (FileInfo $file) {
return $this->createNode($file->getPath(), $file);
}, $files)]]></code>
@@ -1985,7 +1984,6 @@
<code><![CDATA[$node]]></code>
</MoreSpecificImplementedParamType>
<MoreSpecificReturnType>
- <code><![CDATA[\OC\Files\Node\Node]]></code>
<code><![CDATA[\OC\Files\Node\Node[]]]></code>
</MoreSpecificReturnType>
</file>
@@ -2046,7 +2044,6 @@
<file src="lib/private/Files/Node/Root.php">
<LessSpecificReturnStatement>
<code><![CDATA[$folders]]></code>
- <code><![CDATA[$this->createNode($fullPath, $fileInfo, false)]]></code>
<code><![CDATA[$this->mountManager->findByNumericId($numericId)]]></code>
<code><![CDATA[$this->mountManager->findByStorageId($storageId)]]></code>
<code><![CDATA[$this->mountManager->findIn($mountPoint)]]></code>
@@ -2054,7 +2051,6 @@
</LessSpecificReturnStatement>
<MoreSpecificReturnType>
<code><![CDATA[MountPoint[]]]></code>
- <code><![CDATA[Node]]></code>
<code><![CDATA[\OC\Files\Mount\MountPoint[]]]></code>
<code><![CDATA[\OC\Files\Mount\MountPoint[]]]></code>
<code><![CDATA[\OC\User\User]]></code>
diff --git a/lib/private/Files/Node/Folder.php b/lib/private/Files/Node/Folder.php
index d8344f3d5bd..a894c69649a 100644
--- a/lib/private/Files/Node/Folder.php
+++ b/lib/private/Files/Node/Folder.php
@@ -103,26 +103,15 @@ class Folder extends Node implements \OCP\Files\Folder {
}
}
- /**
- * Get the node at $path
- *
- * @param string $path
- * @return \OC\Files\Node\Node
- * @throws \OCP\Files\NotFoundException
- */
public function get($path) {
return $this->root->get($this->getFullPath($path));
}
- /**
- * @param string $path
- * @return bool
- */
public function nodeExists($path) {
try {
$this->get($path);
return true;
- } catch (NotFoundException $e) {
+ } catch (NotFoundException|NotPermittedException) {
return false;
}
}
diff --git a/lib/private/Files/Node/LazyFolder.php b/lib/private/Files/Node/LazyFolder.php
index 83ed7e534a7..5879748d951 100644
--- a/lib/private/Files/Node/LazyFolder.php
+++ b/lib/private/Files/Node/LazyFolder.php
@@ -134,9 +134,6 @@ class LazyFolder implements Folder {
$this->__call(__FUNCTION__, func_get_args());
}
- /**
- * @inheritDoc
- */
public function get($path) {
return $this->getRootFolder()->get($this->getFullPath($path));
}
@@ -422,9 +419,6 @@ class LazyFolder implements Folder {
return $this->__call(__FUNCTION__, func_get_args());
}
- /**
- * @inheritDoc
- */
public function nodeExists($path) {
return $this->__call(__FUNCTION__, func_get_args());
}
diff --git a/lib/private/Files/Node/Root.php b/lib/private/Files/Node/Root.php
index dbe03a4cfbf..1686051131d 100644
--- a/lib/private/Files/Node/Root.php
+++ b/lib/private/Files/Node/Root.php
@@ -171,12 +171,6 @@ class Root extends Folder implements IRootFolder {
$this->mountManager->remove($mount);
}
- /**
- * @param string $path
- * @return Node
- * @throws \OCP\Files\NotPermittedException
- * @throws \OCP\Files\NotFoundException
- */
public function get($path) {
$path = $this->normalizePath($path);
if ($this->isValidPath($path)) {
diff --git a/lib/public/Files/Folder.php b/lib/public/Files/Folder.php
index 3f05ff49890..3128a17c10c 100644
--- a/lib/public/Files/Folder.php
+++ b/lib/public/Files/Folder.php
@@ -60,6 +60,7 @@ interface Folder extends Node {
* @param string $path relative path of the file or folder
* @return \OCP\Files\Node
* @throws \OCP\Files\NotFoundException
+ * @throws \OCP\Files\NotPermittedException
* @since 6.0.0
*/
public function get($path);