Fix psalm issues

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
pull/35009/head
Côme Chilliet 2022-11-08 17:13:45 +07:00 committed by Côme Chilliet (Rebase PR Action)
parent 5ed840ed23
commit 81d3a76d5d
1 changed files with 6 additions and 0 deletions

@ -150,9 +150,15 @@ class QuotaPlugin extends \Sabre\DAV\ServerPlugin {
// get target node for proper path conversion
if ($this->server->tree->nodeExists($destinationPath)) {
$destinationNode = $this->server->tree->getNodeForPath($destinationPath);
if (!$destinationNode instanceof Node) {
return false;
}
$path = $destinationNode->getPath();
} else {
$parentNode = $this->server->tree->getNodeForPath(dirname($destinationPath));
if (!$parentNode instanceof Node) {
return false;
}
$path = $parentNode->getPath();
}