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
path: root/lib
diff options
context:
space:
mode:
authordartcafe <github@dartcafe.de>2020-10-04 19:27:07 +0300
committerdartcafe <github@dartcafe.de>2020-10-04 19:27:07 +0300
commit36678bef89db72fd641131dbdac98f4074fc6aa4 (patch)
tree591106e22ac9f73e65ee61b20a26fbbb4de082ec /lib
parente7c85c8c53b8874364ece750e4cfe659c1e4fb32 (diff)
adding break
Diffstat (limited to 'lib')
-rw-r--r--lib/Service/MailService.php4
-rw-r--r--lib/Service/ShareService.php6
2 files changed, 10 insertions, 0 deletions
diff --git a/lib/Service/MailService.php b/lib/Service/MailService.php
index 04fd63e3..229a0d92 100644
--- a/lib/Service/MailService.php
+++ b/lib/Service/MailService.php
@@ -212,6 +212,7 @@ class MailService {
'language' => $user->getLanguage(),
'link' => $internalLink,
];
+ break;
case Share::TYPE_EMAIL:
$user = new Email($share->getUserId());
@@ -222,6 +223,7 @@ class MailService {
'language' => $defaultLang,
'link' => $tokenLink,
];
+ break;
case Share::TYPE_CONTACT:
$user = new Contact($share->getUserId());
@@ -232,6 +234,7 @@ class MailService {
'language' => $defaultLang,
'link' => $tokenLink,
];
+ break;
case Share::TYPE_EXTERNAL:
$recipients[] = [
'userId' => $share->getUserId(),
@@ -240,6 +243,7 @@ class MailService {
'language' => $defaultLang,
'link' => $tokenLink,
];
+ break;
case Share::TYPE_GROUP:
foreach ((new Group($share->getUserId()))->getMembers() as $user) {
if ($skipUser === $user->getId() || !$user->getUserIsDisabled()) {
diff --git a/lib/Service/ShareService.php b/lib/Service/ShareService.php
index 969ab310..38b9cc09 100644
--- a/lib/Service/ShareService.php
+++ b/lib/Service/ShareService.php
@@ -124,16 +124,22 @@ class ShareService {
switch ($type) {
case Group::TYPE:
$share = new Group($userId);
+ break;
case Circle::TYPE:
$share = new Circle($userId);
+ break;
case Contact::TYPE:
$share = new Contact($userId);
+ break;
case ContactGroup::TYPE:
$share = new ContactGroup($userId);
+ break;
case User::TYPE:
$share = new User($userId);
+ break;
case Email::TYPE:
$share = new Email($userId, $emailAddress);
+ break;
default:
throw new InvalidShareType('Invalid share type (' . $type . ')');
}