Skip to content

Commit 06b5919

Browse files
committed
chore: Break closure call on two lines to make it readable
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
1 parent 31cd216 commit 06b5919

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

apps/dav/lib/SystemTag/SystemTagMappingNode.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,8 @@ public function delete() {
119119
if (!$this->tagManager->canUserAssignTag($this->tag, $this->user)) {
120120
throw new Forbidden('No permission to unassign tag ' . $this->tag->getId());
121121
}
122-
if (!($this->childWriteAccessFunction)($this->objectId)) {
122+
$writeAccessFunction = $this->childWriteAccessFunction;
123+
if (!$writeAccessFunction($this->objectId)) {
123124
throw new Forbidden('No permission to unassign tag to ' . $this->objectId);
124125
}
125126
$this->tagMapper->unassignTags($this->objectId, $this->objectType, $this->tag->getId());

apps/dav/lib/SystemTag/SystemTagsObjectMappingCollection.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,8 @@ public function createFile($name, $data = null) {
6464
if (!$this->tagManager->canUserAssignTag($tag, $this->user)) {
6565
throw new Forbidden('No permission to assign tag ' . $tagId);
6666
}
67-
if (!($this->childWriteAccessFunction)($this->objectId)) {
67+
$writeAccessFunction = $this->childWriteAccessFunction;
68+
if (!$writeAccessFunction($this->objectId)) {
6869
throw new Forbidden('No permission to assign tag to ' . $this->objectId);
6970
}
7071
$this->tagMapper->assignTags($this->objectId, $this->objectType, $tagId);

0 commit comments

Comments
 (0)