Skip to content

Commit f1e2f69

Browse files
committed
fix
Signed-off-by: dartcafe <github@dartcafe.de>
1 parent b3a7a7e commit f1e2f69

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

lib/Service/PollService.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ public function transferPolls(string $sourceUserId, string $targetUserId): array
110110
try {
111111
$targetUser = $this->userMapper->getUserFromUserBase($targetUserId);
112112
} catch (UserNotFoundException $e) {
113-
throw new InvalidUsernameException('The user id "' . $targetUser . '" for the target user is not valid.');
113+
throw new InvalidUsernameException('The user id "' . $targetUserId . '" for the target user is not valid.');
114114
}
115115

116116
$pollsToTransfer = $this->pollMapper->listByOwner($sourceUserId);
@@ -137,7 +137,7 @@ public function takeover(int $pollId, ?UserBase $targetUser = null): Poll {
137137
* @param int|Poll $poll poll or pollId of poll to transfer ownership
138138
* @param null|string|UserBase $targetUser User to transfer polls to. If null the current user will be used
139139
*/
140-
public function transferPoll(int|Poll $poll, string|UserBase $targetUser): Poll {
140+
public function transferPoll(int|Poll $poll, null|string|UserBase $targetUser): Poll {
141141
if (!($poll instanceof Poll)) {
142142
$poll = $this->pollMapper->find($poll);
143143
}

0 commit comments

Comments
 (0)