Skip to content

Commit 37624f2

Browse files
committed
fix: Correct typing
Signed-off-by: Louis Chmn <louis@chmn.me>
1 parent e131fca commit 37624f2

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

lib/Controller/CardApiController.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,11 +72,11 @@ public function create($title, $type = 'plain', $order = 999, $description = '',
7272
$card = $this->cardService->create($title, $this->request->getParam('stackId'), $type, $order, $this->userId, $description, $duedate);
7373

7474
foreach ($labels as $labelId) {
75-
$this->cardService->assignLabel($card->id, $labelId);
75+
$this->cardService->assignLabel($card->getId(), $labelId);
7676
}
7777

7878
foreach ($users as $user) {
79-
$this->assignmentService->assignUser($card->id, $user['id'], $user['type']);
79+
$this->assignmentService->assignUser($card->getId(), $user['id'], $user['type']);
8080
}
8181

8282
return new DataResponse($card, HTTP::STATUS_OK);

lib/Service/FilesAppService.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ public function markAsDeleted(Attachment $attachment) {
312312
*/
313313
private function getShareForAttachment(Attachment $attachment): IShare {
314314
try {
315-
$share = $this->shareProvider->getShareById($attachment->getId());
315+
$share = $this->shareProvider->getShareById((string)$attachment->getId());
316316
} catch (ShareNotFound $e) {
317317
throw new NoPermissionException('No permission to access the attachment from the card');
318318
}

lib/Sharing/DeckShareProvider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,7 @@ public function restore(IShare $share, string $recipient): IShare {
419419

420420
$qb->executeStatement();
421421

422-
return $this->getShareById((int)$share->getId(), $recipient);
422+
return $this->getShareById((string)$share->getId(), $recipient);
423423
}
424424

425425
/**

0 commit comments

Comments
 (0)