aboutsummaryrefslogtreecommitdiffstats
path: root/apps/dav/lib/CalDAV
diff options
context:
space:
mode:
Diffstat (limited to 'apps/dav/lib/CalDAV')
-rw-r--r--apps/dav/lib/CalDAV/Activity/Backend.php10
-rw-r--r--apps/dav/lib/CalDAV/Activity/Provider/Calendar.php38
-rw-r--r--apps/dav/lib/CalDAV/Activity/Provider/Event.php10
-rw-r--r--apps/dav/lib/CalDAV/Activity/Provider/Todo.php18
-rw-r--r--apps/dav/lib/CalDAV/CalDavBackend.php2
-rw-r--r--apps/dav/lib/CalDAV/Reminder/ReminderService.php2
-rw-r--r--apps/dav/lib/CalDAV/Schedule/IMipPlugin.php2
7 files changed, 41 insertions, 41 deletions
diff --git a/apps/dav/lib/CalDAV/Activity/Backend.php b/apps/dav/lib/CalDAV/Activity/Backend.php
index d0232cde1b1..804b88d0322 100644
--- a/apps/dav/lib/CalDAV/Activity/Backend.php
+++ b/apps/dav/lib/CalDAV/Activity/Backend.php
@@ -216,7 +216,7 @@ class Backend {
if ($owner === $event->getAuthor()) {
$subject = Calendar::SUBJECT_UNSHARE_USER . '_you';
- } else if ($principal[2] === $event->getAuthor()) {
+ } elseif ($principal[2] === $event->getAuthor()) {
$subject = Calendar::SUBJECT_UNSHARE_USER . '_self';
} else {
$event->setAffectedUser($event->getAuthor())
@@ -230,7 +230,7 @@ class Backend {
->setSubject($subject, $parameters);
$this->activityManager->publish($event);
}
- } else if ($principal[1] === 'groups') {
+ } elseif ($principal[1] === 'groups') {
$this->triggerActivityGroup($principal[2], $event, $calendarData, Calendar::SUBJECT_UNSHARE_USER);
$parameters = [
@@ -299,7 +299,7 @@ class Backend {
->setSubject($subject, $parameters);
$this->activityManager->publish($event);
}
- } else if ($principal[1] === 'groups') {
+ } elseif ($principal[1] === 'groups') {
$this->triggerActivityGroup($principal[2], $event, $calendarData, Calendar::SUBJECT_SHARE_USER);
$parameters = [
@@ -422,7 +422,7 @@ class Backend {
if ($object['type'] === 'todo' && strpos($action, Event::SUBJECT_OBJECT_UPDATE) === 0 && $object['status'] === 'COMPLETED') {
$action .= '_completed';
- } else if ($object['type'] === 'todo' && strpos($action, Event::SUBJECT_OBJECT_UPDATE) === 0 && $object['status'] === 'NEEDS-ACTION') {
+ } elseif ($object['type'] === 'todo' && strpos($action, Event::SUBJECT_OBJECT_UPDATE) === 0 && $object['status'] === 'NEEDS-ACTION') {
$action .= '_needs_action';
}
@@ -499,7 +499,7 @@ class Backend {
$prinical = explode('/', $share['{http://owncloud.org/ns}principal']);
if ($prinical[1] === 'users') {
$users[] = $prinical[2];
- } else if ($prinical[1] === 'groups') {
+ } elseif ($prinical[1] === 'groups') {
$groups[] = $prinical[2];
}
}
diff --git a/apps/dav/lib/CalDAV/Activity/Provider/Calendar.php b/apps/dav/lib/CalDAV/Activity/Provider/Calendar.php
index 68814e88bcb..0a070810bdb 100644
--- a/apps/dav/lib/CalDAV/Activity/Provider/Calendar.php
+++ b/apps/dav/lib/CalDAV/Activity/Provider/Calendar.php
@@ -101,44 +101,44 @@ class Calendar extends Base {
if ($event->getSubject() === self::SUBJECT_ADD) {
$subject = $this->l->t('{actor} created calendar {calendar}');
- } else if ($event->getSubject() === self::SUBJECT_ADD . '_self') {
+ } elseif ($event->getSubject() === self::SUBJECT_ADD . '_self') {
$subject = $this->l->t('You created calendar {calendar}');
- } else if ($event->getSubject() === self::SUBJECT_DELETE) {
+ } elseif ($event->getSubject() === self::SUBJECT_DELETE) {
$subject = $this->l->t('{actor} deleted calendar {calendar}');
- } else if ($event->getSubject() === self::SUBJECT_DELETE . '_self') {
+ } elseif ($event->getSubject() === self::SUBJECT_DELETE . '_self') {
$subject = $this->l->t('You deleted calendar {calendar}');
- } else if ($event->getSubject() === self::SUBJECT_UPDATE) {
+ } elseif ($event->getSubject() === self::SUBJECT_UPDATE) {
$subject = $this->l->t('{actor} updated calendar {calendar}');
- } else if ($event->getSubject() === self::SUBJECT_UPDATE . '_self') {
+ } elseif ($event->getSubject() === self::SUBJECT_UPDATE . '_self') {
$subject = $this->l->t('You updated calendar {calendar}');
- } else if ($event->getSubject() === self::SUBJECT_PUBLISH . '_self') {
+ } elseif ($event->getSubject() === self::SUBJECT_PUBLISH . '_self') {
$subject = $this->l->t('You shared calendar {calendar} as public link');
- } else if ($event->getSubject() === self::SUBJECT_UNPUBLISH . '_self') {
+ } elseif ($event->getSubject() === self::SUBJECT_UNPUBLISH . '_self') {
$subject = $this->l->t('You removed public link for calendar {calendar}');
- } else if ($event->getSubject() === self::SUBJECT_SHARE_USER) {
+ } elseif ($event->getSubject() === self::SUBJECT_SHARE_USER) {
$subject = $this->l->t('{actor} shared calendar {calendar} with you');
- } else if ($event->getSubject() === self::SUBJECT_SHARE_USER . '_you') {
+ } elseif ($event->getSubject() === self::SUBJECT_SHARE_USER . '_you') {
$subject = $this->l->t('You shared calendar {calendar} with {user}');
- } else if ($event->getSubject() === self::SUBJECT_SHARE_USER . '_by') {
+ } elseif ($event->getSubject() === self::SUBJECT_SHARE_USER . '_by') {
$subject = $this->l->t('{actor} shared calendar {calendar} with {user}');
- } else if ($event->getSubject() === self::SUBJECT_UNSHARE_USER) {
+ } elseif ($event->getSubject() === self::SUBJECT_UNSHARE_USER) {
$subject = $this->l->t('{actor} unshared calendar {calendar} from you');
- } else if ($event->getSubject() === self::SUBJECT_UNSHARE_USER . '_you') {
+ } elseif ($event->getSubject() === self::SUBJECT_UNSHARE_USER . '_you') {
$subject = $this->l->t('You unshared calendar {calendar} from {user}');
- } else if ($event->getSubject() === self::SUBJECT_UNSHARE_USER . '_by') {
+ } elseif ($event->getSubject() === self::SUBJECT_UNSHARE_USER . '_by') {
$subject = $this->l->t('{actor} unshared calendar {calendar} from {user}');
- } else if ($event->getSubject() === self::SUBJECT_UNSHARE_USER . '_self') {
+ } elseif ($event->getSubject() === self::SUBJECT_UNSHARE_USER . '_self') {
$subject = $this->l->t('{actor} unshared calendar {calendar} from themselves');
- } else if ($event->getSubject() === self::SUBJECT_SHARE_GROUP . '_you') {
+ } elseif ($event->getSubject() === self::SUBJECT_SHARE_GROUP . '_you') {
$subject = $this->l->t('You shared calendar {calendar} with group {group}');
- } else if ($event->getSubject() === self::SUBJECT_SHARE_GROUP . '_by') {
+ } elseif ($event->getSubject() === self::SUBJECT_SHARE_GROUP . '_by') {
$subject = $this->l->t('{actor} shared calendar {calendar} with group {group}');
- } else if ($event->getSubject() === self::SUBJECT_UNSHARE_GROUP . '_you') {
+ } elseif ($event->getSubject() === self::SUBJECT_UNSHARE_GROUP . '_you') {
$subject = $this->l->t('You unshared calendar {calendar} from group {group}');
- } else if ($event->getSubject() === self::SUBJECT_UNSHARE_GROUP . '_by') {
+ } elseif ($event->getSubject() === self::SUBJECT_UNSHARE_GROUP . '_by') {
$subject = $this->l->t('{actor} unshared calendar {calendar} from group {group}');
} else {
throw new \InvalidArgumentException();
@@ -153,7 +153,7 @@ class Calendar extends Base {
if (isset($parsedParameters['user'])) {
// Couldn't group by calendar, maybe we can group by users
$event = $this->eventMerger->mergeEvents('user', $event, $previousEvent);
- } else if (isset($parsedParameters['group'])) {
+ } elseif (isset($parsedParameters['group'])) {
// Couldn't group by calendar, maybe we can group by groups
$event = $this->eventMerger->mergeEvents('group', $event, $previousEvent);
}
diff --git a/apps/dav/lib/CalDAV/Activity/Provider/Event.php b/apps/dav/lib/CalDAV/Activity/Provider/Event.php
index c554b2b6d20..9a71553fd31 100644
--- a/apps/dav/lib/CalDAV/Activity/Provider/Event.php
+++ b/apps/dav/lib/CalDAV/Activity/Provider/Event.php
@@ -93,15 +93,15 @@ class Event extends Base {
if ($event->getSubject() === self::SUBJECT_OBJECT_ADD . '_event') {
$subject = $this->l->t('{actor} created event {event} in calendar {calendar}');
- } else if ($event->getSubject() === self::SUBJECT_OBJECT_ADD . '_event_self') {
+ } elseif ($event->getSubject() === self::SUBJECT_OBJECT_ADD . '_event_self') {
$subject = $this->l->t('You created event {event} in calendar {calendar}');
- } else if ($event->getSubject() === self::SUBJECT_OBJECT_DELETE . '_event') {
+ } elseif ($event->getSubject() === self::SUBJECT_OBJECT_DELETE . '_event') {
$subject = $this->l->t('{actor} deleted event {event} from calendar {calendar}');
- } else if ($event->getSubject() === self::SUBJECT_OBJECT_DELETE . '_event_self') {
+ } elseif ($event->getSubject() === self::SUBJECT_OBJECT_DELETE . '_event_self') {
$subject = $this->l->t('You deleted event {event} from calendar {calendar}');
- } else if ($event->getSubject() === self::SUBJECT_OBJECT_UPDATE . '_event') {
+ } elseif ($event->getSubject() === self::SUBJECT_OBJECT_UPDATE . '_event') {
$subject = $this->l->t('{actor} updated event {event} in calendar {calendar}');
- } else if ($event->getSubject() === self::SUBJECT_OBJECT_UPDATE . '_event_self') {
+ } elseif ($event->getSubject() === self::SUBJECT_OBJECT_UPDATE . '_event_self') {
$subject = $this->l->t('You updated event {event} in calendar {calendar}');
} else {
throw new \InvalidArgumentException();
diff --git a/apps/dav/lib/CalDAV/Activity/Provider/Todo.php b/apps/dav/lib/CalDAV/Activity/Provider/Todo.php
index 9e0fe769628..54339566823 100644
--- a/apps/dav/lib/CalDAV/Activity/Provider/Todo.php
+++ b/apps/dav/lib/CalDAV/Activity/Provider/Todo.php
@@ -50,24 +50,24 @@ class Todo extends Event {
if ($event->getSubject() === self::SUBJECT_OBJECT_ADD . '_todo') {
$subject = $this->l->t('{actor} created todo {todo} in list {calendar}');
- } else if ($event->getSubject() === self::SUBJECT_OBJECT_ADD . '_todo_self') {
+ } elseif ($event->getSubject() === self::SUBJECT_OBJECT_ADD . '_todo_self') {
$subject = $this->l->t('You created todo {todo} in list {calendar}');
- } else if ($event->getSubject() === self::SUBJECT_OBJECT_DELETE . '_todo') {
+ } elseif ($event->getSubject() === self::SUBJECT_OBJECT_DELETE . '_todo') {
$subject = $this->l->t('{actor} deleted todo {todo} from list {calendar}');
- } else if ($event->getSubject() === self::SUBJECT_OBJECT_DELETE . '_todo_self') {
+ } elseif ($event->getSubject() === self::SUBJECT_OBJECT_DELETE . '_todo_self') {
$subject = $this->l->t('You deleted todo {todo} from list {calendar}');
- } else if ($event->getSubject() === self::SUBJECT_OBJECT_UPDATE . '_todo') {
+ } elseif ($event->getSubject() === self::SUBJECT_OBJECT_UPDATE . '_todo') {
$subject = $this->l->t('{actor} updated todo {todo} in list {calendar}');
- } else if ($event->getSubject() === self::SUBJECT_OBJECT_UPDATE . '_todo_self') {
+ } elseif ($event->getSubject() === self::SUBJECT_OBJECT_UPDATE . '_todo_self') {
$subject = $this->l->t('You updated todo {todo} in list {calendar}');
- } else if ($event->getSubject() === self::SUBJECT_OBJECT_UPDATE . '_todo_completed') {
+ } elseif ($event->getSubject() === self::SUBJECT_OBJECT_UPDATE . '_todo_completed') {
$subject = $this->l->t('{actor} solved todo {todo} in list {calendar}');
- } else if ($event->getSubject() === self::SUBJECT_OBJECT_UPDATE . '_todo_completed_self') {
+ } elseif ($event->getSubject() === self::SUBJECT_OBJECT_UPDATE . '_todo_completed_self') {
$subject = $this->l->t('You solved todo {todo} in list {calendar}');
- } else if ($event->getSubject() === self::SUBJECT_OBJECT_UPDATE . '_todo_needs_action') {
+ } elseif ($event->getSubject() === self::SUBJECT_OBJECT_UPDATE . '_todo_needs_action') {
$subject = $this->l->t('{actor} reopened todo {todo} in list {calendar}');
- } else if ($event->getSubject() === self::SUBJECT_OBJECT_UPDATE . '_todo_needs_action_self') {
+ } elseif ($event->getSubject() === self::SUBJECT_OBJECT_UPDATE . '_todo_needs_action_self') {
$subject = $this->l->t('You reopened todo {todo} in list {calendar}');
} else {
throw new \InvalidArgumentException();
diff --git a/apps/dav/lib/CalDAV/CalDavBackend.php b/apps/dav/lib/CalDAV/CalDavBackend.php
index a6f1cef7095..9b96a4cfaaa 100644
--- a/apps/dav/lib/CalDAV/CalDavBackend.php
+++ b/apps/dav/lib/CalDAV/CalDavBackend.php
@@ -742,7 +742,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription
throw new DAV\Exception('The ' . $sccs . ' property must be of type: \Sabre\CalDAV\Property\SupportedCalendarComponentSet');
}
$values['components'] = implode(',',$properties[$sccs]->getValue());
- } else if (isset($properties['components'])) {
+ } elseif (isset($properties['components'])) {
// Allow to provide components internally without having
// to create a SupportedCalendarComponentSet object
$values['components'] = $properties['components'];
diff --git a/apps/dav/lib/CalDAV/Reminder/ReminderService.php b/apps/dav/lib/CalDAV/Reminder/ReminderService.php
index 39fe4b248cb..48feaa0c589 100644
--- a/apps/dav/lib/CalDAV/Reminder/ReminderService.php
+++ b/apps/dav/lib/CalDAV/Reminder/ReminderService.php
@@ -511,7 +511,7 @@ class ReminderService {
$users[] = $user;
$userIds[] = $principal[2];
}
- } else if ($principal[1] === 'groups') {
+ } elseif ($principal[1] === 'groups') {
$groups[] = $principal[2];
}
}
diff --git a/apps/dav/lib/CalDAV/Schedule/IMipPlugin.php b/apps/dav/lib/CalDAV/Schedule/IMipPlugin.php
index 5493eb693f9..1e7d66d0772 100644
--- a/apps/dav/lib/CalDAV/Schedule/IMipPlugin.php
+++ b/apps/dav/lib/CalDAV/Schedule/IMipPlugin.php
@@ -516,7 +516,7 @@ class IMipPlugin extends SabreIMipPlugin {
$template->setSubject('Cancelled: ' . $summary);
$template->addHeading($l10n->t('Invitation canceled'), $l10n->t('Hello %s,', [$attendeeName]));
$template->addBodyText($l10n->t('The meeting »%1$s« with %2$s was canceled.', [$summary, $inviteeName]));
- } else if ($method === self::METHOD_REPLY) {
+ } elseif ($method === self::METHOD_REPLY) {
$template->setSubject('Re: ' . $summary);
$template->addHeading($l10n->t('Invitation updated'), $l10n->t('Hello %s,', [$attendeeName]));
$template->addBodyText($l10n->t('The meeting »%1$s« with %2$s was updated.', [$summary, $inviteeName]));