Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/polls.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordartcafe <github@dartcafe.de>2020-10-05 23:37:16 +0300
committerdartcafe <github@dartcafe.de>2020-10-17 17:45:38 +0300
commit26449b769fe42918a0e4a871763363dc87df0bc3 (patch)
treec1371ae136dbc4ac158e9d8c7788c81a3d0db2b9 /lib/Controller/ShareController.php
parent577e6529806837e3357cc9b0945416ef9727b089 (diff)
user and group object inheritance over interfaces
Diffstat (limited to 'lib/Controller/ShareController.php')
-rw-r--r--lib/Controller/ShareController.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Controller/ShareController.php b/lib/Controller/ShareController.php
index a8d5c524..d3ddd9c1 100644
--- a/lib/Controller/ShareController.php
+++ b/lib/Controller/ShareController.php
@@ -200,11 +200,11 @@ class ShareController extends Controller {
try {
$share = $this->shareService->get($token);
if ($share->getType() === Share::TYPE_CIRCLE) {
- foreach (new Circle($share->getUserId()->getMembers()) as $member) {
+ foreach ((new Circle($share->getUserId()))->getMembers() as $member) {
$shares[] = $this->shareService->add($share->getPollId(), $member->getType(), $member->getId());
}
} elseif ($share->getType() === Share::TYPE_CONTACTGROUP) {
- foreach (new ContactGroup($share->getUserId()->getMembers()) as $contact) {
+ foreach ((new ContactGroup($share->getUserId()))->getMembers() as $contact) {
$shares[] = $this->shareService->add($share->getPollId(), Share::TYPE_CONTACT, $contact->getId(), $contact->getEmailAddress());
}
}