mirror of
https://github.com/nextcloud/server.git
synced 2026-06-04 22:35:24 -04:00
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>
This commit is contained in:
parent
a40a307b65
commit
8c1f17383b
1 changed files with 2 additions and 2 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue