chore: Break closure call on two lines to make it readable

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
pull/44324/head
Côme Chilliet 3 months ago committed by backportbot[bot]
parent 3291984903
commit fce259127f

@ -114,7 +114,8 @@ class SystemTagMappingNode implements \Sabre\DAV\INode {
if (!$this->tagManager->canUserAssignTag($this->tag, $this->user)) {
throw new Forbidden('No permission to unassign tag ' . $this->tag->getId());
}
if (!($this->childWriteAccessFunction)($this->objectId)) {
$writeAccessFunction = $this->childWriteAccessFunction;
if (!$writeAccessFunction($this->objectId)) {
throw new Forbidden('No permission to unassign tag to ' . $this->objectId);
}
$this->tagMapper->unassignTags($this->objectId, $this->objectType, $this->tag->getId());

@ -61,7 +61,8 @@ class SystemTagsObjectMappingCollection implements ICollection {
if (!$this->tagManager->canUserAssignTag($tag, $this->user)) {
throw new Forbidden('No permission to assign tag ' . $tagId);
}
if (!($this->childWriteAccessFunction)($this->objectId)) {
$writeAccessFunction = $this->childWriteAccessFunction;
if (!$writeAccessFunction($this->objectId)) {
throw new Forbidden('No permission to assign tag to ' . $this->objectId);
}
$this->tagMapper->assignTags($this->objectId, $this->objectType, $tagId);

Loading…
Cancel
Save