Fix psalm issues

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
This commit is contained in:
Côme Chilliet 2022-11-08 17:13:45 +01:00 committed by backportbot-nextcloud[bot]
parent 6638b5411e
commit 9dade992ad

View file

@ -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();
}