Skip to content
Closed
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
31 changes: 31 additions & 0 deletions apps/dav/lib/SystemTag/SystemTagPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,37 @@
$propFind->handle(self::FILEID_PROPERTYNAME, function () use ($node): int {
return $node->getReferenceFileId();
});

$propFind->handle(self::OBJECTIDS_PROPERTYNAME, function () use ($node): SystemTagsObjectList {

Check failure on line 279 in apps/dav/lib/SystemTag/SystemTagPlugin.php

View workflow job for this annotation

GitHub Actions / static-code-analysis

UndefinedClass

apps/dav/lib/SystemTag/SystemTagPlugin.php:279:77: UndefinedClass: Class, interface or enum named OCA\DAV\SystemTag\SystemTagsObjectList does not exist (see https://psalm.dev/019)

Check failure on line 279 in apps/dav/lib/SystemTag/SystemTagPlugin.php

View workflow job for this annotation

GitHub Actions / static-code-analysis

UndefinedConstant

apps/dav/lib/SystemTag/SystemTagPlugin.php:279:22: UndefinedConstant: Constant OCA\DAV\SystemTag\SystemTagPlugin::OBJECTIDS_PROPERTYNAME is not defined (see https://psalm.dev/020)
$objectTypes = $this->tagMapper->getAvailableObjectTypes();

Check failure on line 280 in apps/dav/lib/SystemTag/SystemTagPlugin.php

View workflow job for this annotation

GitHub Actions / static-code-analysis

UndefinedInterfaceMethod

apps/dav/lib/SystemTag/SystemTagPlugin.php:280:38: UndefinedInterfaceMethod: Method OCP\SystemTag\ISystemTagObjectMapper::getAvailableObjectTypes does not exist (see https://psalm.dev/181)
$objects = [];
foreach ($objectTypes as $type) {
$systemTagObjectType = new SystemTagObjectType($node->getSystemTag(), $type, $this->tagManager, $this->tagMapper);

Check failure on line 283 in apps/dav/lib/SystemTag/SystemTagPlugin.php

View workflow job for this annotation

GitHub Actions / static-code-analysis

UndefinedClass

apps/dav/lib/SystemTag/SystemTagPlugin.php:283:33: UndefinedClass: Class, interface or enum named OCA\DAV\SystemTag\SystemTagObjectType does not exist (see https://psalm.dev/019)
$objects = array_merge($objects, array_fill_keys($systemTagObjectType->getObjectsIds(), $type));

Check failure on line 284 in apps/dav/lib/SystemTag/SystemTagPlugin.php

View workflow job for this annotation

GitHub Actions / static-code-analysis

UndefinedClass

apps/dav/lib/SystemTag/SystemTagPlugin.php:284:55: UndefinedClass: Class, interface or enum named OCA\DAV\SystemTag\SystemTagObjectType does not exist (see https://psalm.dev/019)
}
return new SystemTagsObjectList($objects);

Check failure on line 286 in apps/dav/lib/SystemTag/SystemTagPlugin.php

View workflow job for this annotation

GitHub Actions / static-code-analysis

UndefinedClass

apps/dav/lib/SystemTag/SystemTagPlugin.php:286:16: UndefinedClass: Class, interface or enum named OCA\DAV\SystemTag\SystemTagsObjectList does not exist (see https://psalm.dev/019)
});
}

if ($node instanceof SystemTagObjectType) {

Check failure on line 290 in apps/dav/lib/SystemTag/SystemTagPlugin.php

View workflow job for this annotation

GitHub Actions / static-code-analysis

UndefinedClass

apps/dav/lib/SystemTag/SystemTagPlugin.php:290:24: UndefinedClass: Class, interface or enum named OCA\DAV\SystemTag\SystemTagObjectType does not exist (see https://psalm.dev/019)
$propFind->handle(self::OBJECTIDS_PROPERTYNAME, function () use ($node): SystemTagsObjectList {
$user = $this->userSession->getUser();
if ($user === null) {
return new SystemTagsObjectList([]);
}

$allIds = $node->getObjectsIds();
$userFolder = $this->rootFolder->getUserFolder($user->getUID());
$filteredIds = [];
foreach ($allIds as $id) {
if ($userFolder->getFirstNodeById((int)$id) !== null) {
$filteredIds[] = $id;
}
}
return new SystemTagsObjectList(
array_fill_keys($filteredIds, $node->getName())
);
});
}
}

Expand Down
Loading