diff options
author | Christoph Wurst <christoph@winzerhof-wurst.at> | 2020-04-10 10:35:09 +0200 |
---|---|---|
committer | Christoph Wurst <christoph@winzerhof-wurst.at> | 2020-04-10 10:35:09 +0200 |
commit | 14c996d98256de958da367297c3313e0fa7ef9a8 (patch) | |
tree | 27074d5403b67cbaf59d7b7181481ebe70af5d9e /apps/dav | |
parent | d6e17fb01777866674129a5883c03642f4bfd4a5 (diff) | |
download | nextcloud-server-14c996d98256de958da367297c3313e0fa7ef9a8.tar.gz nextcloud-server-14c996d98256de958da367297c3313e0fa7ef9a8.zip |
Use elseif instead of else if
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'apps/dav')
-rw-r--r-- | apps/dav/lib/AppInfo/Application.php | 2 | ||||
-rw-r--r-- | apps/dav/lib/CalDAV/Activity/Backend.php | 10 | ||||
-rw-r--r-- | apps/dav/lib/CalDAV/Activity/Provider/Calendar.php | 38 | ||||
-rw-r--r-- | apps/dav/lib/CalDAV/Activity/Provider/Event.php | 10 | ||||
-rw-r--r-- | apps/dav/lib/CalDAV/Activity/Provider/Todo.php | 18 | ||||
-rw-r--r-- | apps/dav/lib/CalDAV/CalDavBackend.php | 2 | ||||
-rw-r--r-- | apps/dav/lib/CalDAV/Reminder/ReminderService.php | 2 | ||||
-rw-r--r-- | apps/dav/lib/CalDAV/Schedule/IMipPlugin.php | 2 | ||||
-rw-r--r-- | apps/dav/lib/CardDAV/AddressBookImpl.php | 4 | ||||
-rw-r--r-- | apps/dav/lib/Connector/PublicAuth.php | 4 | ||||
-rw-r--r-- | apps/dav/lib/Connector/Sabre/File.php | 4 | ||||
-rw-r--r-- | apps/dav/lib/Connector/Sabre/FilesReportPlugin.php | 4 | ||||
-rw-r--r-- | apps/dav/lib/Connector/Sabre/Principal.php | 2 | ||||
-rw-r--r-- | apps/dav/lib/DAV/Sharing/Backend.php | 2 | ||||
-rw-r--r-- | apps/dav/lib/Upload/AssemblyStream.php | 2 | ||||
-rw-r--r-- | apps/dav/tests/unit/CardDAV/ImageExportPluginTest.php | 2 | ||||
-rw-r--r-- | apps/dav/tests/unit/Connector/Sabre/RequestTest/Sapi.php | 2 |
17 files changed, 55 insertions, 55 deletions
diff --git a/apps/dav/lib/AppInfo/Application.php b/apps/dav/lib/AppInfo/Application.php index 64a1f738a70..caad7bf040b 100644 --- a/apps/dav/lib/AppInfo/Application.php +++ b/apps/dav/lib/AppInfo/Application.php @@ -224,7 +224,7 @@ class Application extends App { $subject = Event::SUBJECT_OBJECT_ADD; if ($eventName === '\OCA\DAV\CalDAV\CalDavBackend::updateCalendarObject') { $subject = Event::SUBJECT_OBJECT_UPDATE; - } else if ($eventName === '\OCA\DAV\CalDAV\CalDavBackend::deleteCalendarObject') { + } elseif ($eventName === '\OCA\DAV\CalDAV\CalDavBackend::deleteCalendarObject') { $subject = Event::SUBJECT_OBJECT_DELETE; } $backend->onTouchCalendarObject( 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])); diff --git a/apps/dav/lib/CardDAV/AddressBookImpl.php b/apps/dav/lib/CardDAV/AddressBookImpl.php index fd1cd8827aa..01ebdcd7019 100644 --- a/apps/dav/lib/CardDAV/AddressBookImpl.php +++ b/apps/dav/lib/CardDAV/AddressBookImpl.php @@ -262,7 +262,7 @@ class AddressBookImpl implements IAddressBook { $result['PHOTO'] = 'VALUE=uri:' . $url; - } else if ($property->name === 'X-SOCIALPROFILE') { + } elseif ($property->name === 'X-SOCIALPROFILE') { $type = $this->getTypeFromProperty($property); // Type is the social network, when it's empty we don't need this. @@ -274,7 +274,7 @@ class AddressBookImpl implements IAddressBook { } // The following properties can be set multiple times - } else if (in_array($property->name, ['CLOUD', 'EMAIL', 'IMPP', 'TEL', 'URL', 'X-ADDRESSBOOKSERVER-MEMBER'])) { + } elseif (in_array($property->name, ['CLOUD', 'EMAIL', 'IMPP', 'TEL', 'URL', 'X-ADDRESSBOOKSERVER-MEMBER'])) { if (!isset($result[$property->name])) { $result[$property->name] = []; } diff --git a/apps/dav/lib/Connector/PublicAuth.php b/apps/dav/lib/Connector/PublicAuth.php index d92fbc68df3..59c5c0a38e6 100644 --- a/apps/dav/lib/Connector/PublicAuth.php +++ b/apps/dav/lib/Connector/PublicAuth.php @@ -104,7 +104,7 @@ class PublicAuth extends AbstractBasic { || $share->getShareType() === IShare::TYPE_CIRCLE) { if ($this->shareManager->checkPassword($share, $password)) { return true; - } else if ($this->session->exists('public_link_authenticated') + } elseif ($this->session->exists('public_link_authenticated') && $this->session->get('public_link_authenticated') === (string)$share->getId()) { return true; } else { @@ -116,7 +116,7 @@ class PublicAuth extends AbstractBasic { } return false; } - } else if ($share->getShareType() === IShare::TYPE_REMOTE) { + } elseif ($share->getShareType() === IShare::TYPE_REMOTE) { return true; } else { return false; diff --git a/apps/dav/lib/Connector/Sabre/File.php b/apps/dav/lib/Connector/Sabre/File.php index 125935fce5e..d025ba2aaca 100644 --- a/apps/dav/lib/Connector/Sabre/File.php +++ b/apps/dav/lib/Connector/Sabre/File.php @@ -328,7 +328,7 @@ class File extends Node implements IFile { $checksum = trim($this->request->server['HTTP_OC_CHECKSUM']); $this->fileView->putFileInfo($this->path, ['checksum' => $checksum]); $this->refreshInfo(); - } else if ($this->getChecksum() !== null && $this->getChecksum() !== '') { + } elseif ($this->getChecksum() !== null && $this->getChecksum() !== '') { $this->fileView->putFileInfo($this->path, ['checksum' => '']); $this->refreshInfo(); } @@ -592,7 +592,7 @@ class File extends Node implements IFile { if (isset($this->request->server['HTTP_OC_CHECKSUM'])) { $checksum = trim($this->request->server['HTTP_OC_CHECKSUM']); $this->fileView->putFileInfo($targetPath, ['checksum' => $checksum]); - } else if ($info->getChecksum() !== null && $info->getChecksum() !== '') { + } elseif ($info->getChecksum() !== null && $info->getChecksum() !== '') { $this->fileView->putFileInfo($this->path, ['checksum' => '']); } diff --git a/apps/dav/lib/Connector/Sabre/FilesReportPlugin.php b/apps/dav/lib/Connector/Sabre/FilesReportPlugin.php index 1f7c78a5530..4c7c689bde3 100644 --- a/apps/dav/lib/Connector/Sabre/FilesReportPlugin.php +++ b/apps/dav/lib/Connector/Sabre/FilesReportPlugin.php @@ -196,7 +196,7 @@ class FilesReportPlugin extends ServerPlugin { $name = $reportProps['name']; if ($name === $ns . 'filter-rules') { $filterRules = $reportProps['value']; - } else if ($name === '{DAV:}prop') { + } elseif ($name === '{DAV:}prop') { // propfind properties foreach ($reportProps['value'] as $propVal) { $requestedProps[] = $propVal['name']; @@ -422,7 +422,7 @@ class FilesReportPlugin extends ServerPlugin { $entry = current($entry); if ($entry instanceof \OCP\Files\File) { $results[] = new File($this->fileView, $entry); - } else if ($entry instanceof \OCP\Files\Folder) { + } elseif ($entry instanceof \OCP\Files\Folder) { $results[] = new Directory($this->fileView, $entry); } } diff --git a/apps/dav/lib/Connector/Sabre/Principal.php b/apps/dav/lib/Connector/Sabre/Principal.php index 73ebabdc48f..2acc783eecf 100644 --- a/apps/dav/lib/Connector/Sabre/Principal.php +++ b/apps/dav/lib/Connector/Sabre/Principal.php @@ -172,7 +172,7 @@ class Principal implements BackendInterface { if ($user !== null) { return $this->userToPrincipal($user); } - } else if ($prefix === 'principals/circles') { + } elseif ($prefix === 'principals/circles') { try { return $this->circleToPrincipal($name); } catch (QueryException $e) { diff --git a/apps/dav/lib/DAV/Sharing/Backend.php b/apps/dav/lib/DAV/Sharing/Backend.php index 1a813daa2e7..bb04918716e 100644 --- a/apps/dav/lib/DAV/Sharing/Backend.php +++ b/apps/dav/lib/DAV/Sharing/Backend.php @@ -232,7 +232,7 @@ class Backend { 'principal' => $share['{' . \OCA\DAV\DAV\Sharing\Plugin::NS_OWNCLOUD . '}principal'], 'protected' => true, ]; - } else if ($this->resourceType === 'calendar') { + } elseif ($this->resourceType === 'calendar') { // Allow changing the properties of read only calendars, // so users can change the visibility. $acl[] = [ diff --git a/apps/dav/lib/Upload/AssemblyStream.php b/apps/dav/lib/Upload/AssemblyStream.php index c17fe81bef7..560fc7c07bc 100644 --- a/apps/dav/lib/Upload/AssemblyStream.php +++ b/apps/dav/lib/Upload/AssemblyStream.php @@ -91,7 +91,7 @@ class AssemblyStream implements \Icewind\Streams\File { public function stream_seek($offset, $whence = SEEK_SET) { if ($whence === SEEK_CUR) { $offset = $this->stream_tell() + $offset; - } else if ($whence === SEEK_END) { + } elseif ($whence === SEEK_END) { $offset = $this->size + $offset; } diff --git a/apps/dav/tests/unit/CardDAV/ImageExportPluginTest.php b/apps/dav/tests/unit/CardDAV/ImageExportPluginTest.php index 4ef1f1bdda1..6cdfe04e8a9 100644 --- a/apps/dav/tests/unit/CardDAV/ImageExportPluginTest.php +++ b/apps/dav/tests/unit/CardDAV/ImageExportPluginTest.php @@ -143,7 +143,7 @@ class ImageExportPluginTest extends TestCase { ->willReturnCallback(function ($path) use ($card, $book) { if ($path === 'user/book/card') { return $card; - } else if ($path === 'user/book') { + } elseif ($path === 'user/book') { return $book; } $this->fail(); diff --git a/apps/dav/tests/unit/Connector/Sabre/RequestTest/Sapi.php b/apps/dav/tests/unit/Connector/Sabre/RequestTest/Sapi.php index e697d1153cd..ab5c9ec070d 100644 --- a/apps/dav/tests/unit/Connector/Sabre/RequestTest/Sapi.php +++ b/apps/dav/tests/unit/Connector/Sabre/RequestTest/Sapi.php @@ -60,7 +60,7 @@ class Sapi { $copyStream = fopen('php://temp', 'r+'); if (is_string($response->getBody())) { fwrite($copyStream, $response->getBody()); - } else if (is_resource($response->getBody())) { + } elseif (is_resource($response->getBody())) { stream_copy_to_stream($response->getBody(), $copyStream); } rewind($copyStream); |