summaryrefslogtreecommitdiffstats
path: root/apps/dav
diff options
context:
space:
mode:
authorleith abdulla <online-nextcloud@eleith.com>2020-10-29 07:31:56 -0700
committerleith abdulla <online-nextcloud@eleith.com>2020-10-29 07:31:56 -0700
commit8c1f17383bf4b58972c150b86b0753e65acdb704 (patch)
tree9d5bed5be948d75975f3559c0d9874aaeaafcf6e /apps/dav
parenta40a307b65eee6104a000ddcc0b205eaaba188a4 (diff)
downloadnextcloud-server-8c1f17383bf4b58972c150b86b0753e65acdb704.tar.gz
nextcloud-server-8c1f17383bf4b58972c150b86b0753e65acdb704.zip
resolve review comments
update styling for conditionals and simplifying conditional by only relying on dtstart instead of also counting vevents (since they imply the same condition, assuming valid events) Signed-off-by: leith abdulla <online-nextcloud@eleith.com>
Diffstat (limited to 'apps/dav')
-rw-r--r--apps/dav/lib/CalDAV/CalDavBackend.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/dav/lib/CalDAV/CalDavBackend.php b/apps/dav/lib/CalDAV/CalDavBackend.php
index 9cf6e18c5ea..8b66420560d 100644
--- a/apps/dav/lib/CalDAV/CalDavBackend.php
+++ b/apps/dav/lib/CalDAV/CalDavBackend.php
@@ -2392,7 +2392,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription
$classification = self::CLASSIFICATION_PUBLIC;
$hasDTSTART = false;
foreach ($vObject->getComponents() as $component) {
- if ($component->name!=='VTIMEZONE') {
+ if ($component->name !== 'VTIMEZONE') {
// Finding all VEVENTs, and track them
if ($component->name === 'VEVENT') {
array_push($vEvents, $component);
@@ -2411,7 +2411,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription
throw new \Sabre\DAV\Exception\BadRequest('Calendar objects must have a VJOURNAL, VEVENT or VTODO component');
}
- if (count($vEvents) > 0 && $hasDTSTART) {
+ if ($hasDTSTART) {
$component = $vEvents[0];
// Finding the last occurrence is a bit harder