Skip to content

Commit

Permalink
chore(dav): Remove short function closure syntax not supported in PHP…
Browse files Browse the repository at this point in the history
… 7.3

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
  • Loading branch information
come-nc committed Mar 21, 2024
1 parent b4a166e commit 355a6f1
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
4 changes: 3 additions & 1 deletion apps/dav/lib/SystemTag/SystemTagsRelationsCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,9 @@ function ($name): bool {
$userSession,
$groupManager,
$entityExistsFunction,
fn ($name) => true,
function ($name) {

Check notice

Code scanning / Psalm

MissingClosureParamType Note

Parameter $name has no provided type
return true;
},
);
}

Expand Down
4 changes: 3 additions & 1 deletion apps/dav/tests/unit/SystemTag/SystemTagMappingNodeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,9 @@ public function getMappingNode($tag = null, array $writableNodeIds = []) {
$this->user,
$this->tagManager,
$this->tagMapper,
fn ($id): bool => in_array($id, $writableNodeIds),
function ($id): bool {
return in_array($id, $writableNodeIds);
},
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,9 @@ public function getNode(array $writableNodeIds = []) {
$this->user,
$this->tagManager,
$this->tagMapper,
fn ($id): bool => in_array($id, $writableNodeIds),
function ($id): bool {
return in_array($id, $writableNodeIds);
},
);
}

Expand Down

0 comments on commit 355a6f1

Please sign in to comment.