aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/SystemTag/SystemTagObjectMapper.php
diff options
context:
space:
mode:
authorFaraz Samapoor <f.samapoor@gmail.com>2023-06-25 22:20:15 +0330
committerFaraz Samapoor <f.samapoor@gmail.com>2023-11-07 09:41:33 +0330
commita988754e3dc220be5a4fb75df0d24e88461e6b03 (patch)
tree5f2bd240ccf6281c279d32a1d22d000600365696 /lib/private/SystemTag/SystemTagObjectMapper.php
parentd4393174fcb95358f2cbaf3261253e407c6ed356 (diff)
downloadnextcloud-server-a988754e3dc220be5a4fb75df0d24e88461e6b03.tar.gz
nextcloud-server-a988754e3dc220be5a4fb75df0d24e88461e6b03.zip
Refactors lib/private/SystemTag.
Mainly using PHP8's constructor property promotion. Signed-off-by: Faraz Samapoor <f.samapoor@gmail.com>
Diffstat (limited to 'lib/private/SystemTag/SystemTagObjectMapper.php')
-rw-r--r--lib/private/SystemTag/SystemTagObjectMapper.php7
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/private/SystemTag/SystemTagObjectMapper.php b/lib/private/SystemTag/SystemTagObjectMapper.php
index 66a21e58609..614d0274add 100644
--- a/lib/private/SystemTag/SystemTagObjectMapper.php
+++ b/lib/private/SystemTag/SystemTagObjectMapper.php
@@ -81,7 +81,6 @@ class SystemTagObjectMapper implements ISystemTagObjectMapper {
$result->closeCursor();
}
-
return $mapping;
}
@@ -128,7 +127,7 @@ class SystemTagObjectMapper implements ISystemTagObjectMapper {
/**
* {@inheritdoc}
*/
- public function assignTags(string $objId, string $objectType, $tagIds) {
+ public function assignTags(string $objId, string $objectType, $tagIds): void {
if (!\is_array($tagIds)) {
$tagIds = [$tagIds];
}
@@ -169,7 +168,7 @@ class SystemTagObjectMapper implements ISystemTagObjectMapper {
/**
* {@inheritdoc}
*/
- public function unassignTags(string $objId, string $objectType, $tagIds) {
+ public function unassignTags(string $objId, string $objectType, $tagIds): void {
if (!\is_array($tagIds)) {
$tagIds = [$tagIds];
}
@@ -241,7 +240,7 @@ class SystemTagObjectMapper implements ISystemTagObjectMapper {
*
* @throws \OCP\SystemTag\TagNotFoundException if at least one tag did not exist
*/
- private function assertTagsExist($tagIds) {
+ private function assertTagsExist(array $tagIds): void {
$tags = $this->tagManager->getTagsByIds($tagIds);
if (\count($tags) !== \count($tagIds)) {
// at least one tag missing, bail out