Passed
Push — master ( 943eef...4dc8a4 )
by Daniel
27:23 queued 13:37
created
apps/dav/lib/CalDAV/CalDavBackend.php 1 patch
Spacing   +125 added lines, -125 removed lines patch added patch discarded remove patch
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
 		'{urn:ietf:params:xml:ns:caldav}calendar-timezone' => 'timezone',
152 152
 		'{http://apple.com/ns/ical/}calendar-order' => 'calendarorder',
153 153
 		'{http://apple.com/ns/ical/}calendar-color' => 'calendarcolor',
154
-		'{' . \OCA\DAV\DAV\Sharing\Plugin::NS_NEXTCLOUD . '}deleted-at' => 'deleted_at',
154
+		'{'.\OCA\DAV\DAV\Sharing\Plugin::NS_NEXTCLOUD.'}deleted-at' => 'deleted_at',
155 155
 	];
156 156
 
157 157
 	/**
@@ -279,7 +279,7 @@  discard block
 block discarded – undo
279 279
 		}
280 280
 
281 281
 		$result = $query->executeQuery();
282
-		$column = (int)$result->fetchOne();
282
+		$column = (int) $result->fetchOne();
283 283
 		$result->closeCursor();
284 284
 		return $column;
285 285
 	}
@@ -296,7 +296,7 @@  discard block
 block discarded – undo
296 296
 		$result = $qb->executeQuery();
297 297
 		$raw = $result->fetchAll();
298 298
 		$result->closeCursor();
299
-		return array_map(function ($row) {
299
+		return array_map(function($row) {
300 300
 			return [
301 301
 				'id' => (int) $row['id'],
302 302
 				'deleted_at' => (int) $row['deleted_at'],
@@ -359,18 +359,18 @@  discard block
 block discarded – undo
359 359
 			$row['principaluri'] = (string) $row['principaluri'];
360 360
 			$components = [];
361 361
 			if ($row['components']) {
362
-				$components = explode(',',$row['components']);
362
+				$components = explode(',', $row['components']);
363 363
 			}
364 364
 
365 365
 			$calendar = [
366 366
 				'id' => $row['id'],
367 367
 				'uri' => $row['uri'],
368 368
 				'principaluri' => $this->convertPrincipal($row['principaluri'], !$this->legacyEndpoint),
369
-				'{' . Plugin::NS_CALENDARSERVER . '}getctag' => 'http://sabre.io/ns/sync/' . ($row['synctoken']?$row['synctoken']:'0'),
370
-				'{http://sabredav.org/ns}sync-token' => $row['synctoken']?$row['synctoken']:'0',
371
-				'{' . Plugin::NS_CALDAV . '}supported-calendar-component-set' => new SupportedCalendarComponentSet($components),
372
-				'{' . Plugin::NS_CALDAV . '}schedule-calendar-transp' => new ScheduleCalendarTransp($row['transparent']?'transparent':'opaque'),
373
-				'{' . \OCA\DAV\DAV\Sharing\Plugin::NS_OWNCLOUD . '}owner-principal' => $this->convertPrincipal($principalUri, !$this->legacyEndpoint),
369
+				'{'.Plugin::NS_CALENDARSERVER.'}getctag' => 'http://sabre.io/ns/sync/'.($row['synctoken'] ? $row['synctoken'] : '0'),
370
+				'{http://sabredav.org/ns}sync-token' => $row['synctoken'] ? $row['synctoken'] : '0',
371
+				'{'.Plugin::NS_CALDAV.'}supported-calendar-component-set' => new SupportedCalendarComponentSet($components),
372
+				'{'.Plugin::NS_CALDAV.'}schedule-calendar-transp' => new ScheduleCalendarTransp($row['transparent'] ? 'transparent' : 'opaque'),
373
+				'{'.\OCA\DAV\DAV\Sharing\Plugin::NS_OWNCLOUD.'}owner-principal' => $this->convertPrincipal($principalUri, !$this->legacyEndpoint),
374 374
 			];
375 375
 
376 376
 			foreach ($this->propertyMap as $xmlName => $dbName) {
@@ -411,7 +411,7 @@  discard block
 block discarded – undo
411 411
 
412 412
 		$result = $query->executeQuery();
413 413
 
414
-		$readOnlyPropertyName = '{' . \OCA\DAV\DAV\Sharing\Plugin::NS_OWNCLOUD . '}read-only';
414
+		$readOnlyPropertyName = '{'.\OCA\DAV\DAV\Sharing\Plugin::NS_OWNCLOUD.'}read-only';
415 415
 		while ($row = $result->fetch()) {
416 416
 			$row['principaluri'] = (string) $row['principaluri'];
417 417
 			if ($row['principaluri'] === $principalUri) {
@@ -432,21 +432,21 @@  discard block
 block discarded – undo
432 432
 			}
433 433
 
434 434
 			[, $name] = Uri\split($row['principaluri']);
435
-			$uri = $row['uri'] . '_shared_by_' . $name;
436
-			$row['displayname'] = $row['displayname'] . ' (' . $this->getUserDisplayName($name) . ')';
435
+			$uri = $row['uri'].'_shared_by_'.$name;
436
+			$row['displayname'] = $row['displayname'].' ('.$this->getUserDisplayName($name).')';
437 437
 			$components = [];
438 438
 			if ($row['components']) {
439
-				$components = explode(',',$row['components']);
439
+				$components = explode(',', $row['components']);
440 440
 			}
441 441
 			$calendar = [
442 442
 				'id' => $row['id'],
443 443
 				'uri' => $uri,
444 444
 				'principaluri' => $this->convertPrincipal($principalUri, !$this->legacyEndpoint),
445
-				'{' . Plugin::NS_CALENDARSERVER . '}getctag' => 'http://sabre.io/ns/sync/' . ($row['synctoken']?$row['synctoken']:'0'),
446
-				'{http://sabredav.org/ns}sync-token' => $row['synctoken']?$row['synctoken']:'0',
447
-				'{' . Plugin::NS_CALDAV . '}supported-calendar-component-set' => new SupportedCalendarComponentSet($components),
448
-				'{' . Plugin::NS_CALDAV . '}schedule-calendar-transp' => new ScheduleCalendarTransp('transparent'),
449
-				'{' . \OCA\DAV\DAV\Sharing\Plugin::NS_OWNCLOUD . '}owner-principal' => $this->convertPrincipal($row['principaluri'], !$this->legacyEndpoint),
445
+				'{'.Plugin::NS_CALENDARSERVER.'}getctag' => 'http://sabre.io/ns/sync/'.($row['synctoken'] ? $row['synctoken'] : '0'),
446
+				'{http://sabredav.org/ns}sync-token' => $row['synctoken'] ? $row['synctoken'] : '0',
447
+				'{'.Plugin::NS_CALDAV.'}supported-calendar-component-set' => new SupportedCalendarComponentSet($components),
448
+				'{'.Plugin::NS_CALDAV.'}schedule-calendar-transp' => new ScheduleCalendarTransp('transparent'),
449
+				'{'.\OCA\DAV\DAV\Sharing\Plugin::NS_OWNCLOUD.'}owner-principal' => $this->convertPrincipal($row['principaluri'], !$this->legacyEndpoint),
450 450
 				$readOnlyPropertyName => $readOnly,
451 451
 			];
452 452
 
@@ -488,16 +488,16 @@  discard block
 block discarded – undo
488 488
 			$row['principaluri'] = (string) $row['principaluri'];
489 489
 			$components = [];
490 490
 			if ($row['components']) {
491
-				$components = explode(',',$row['components']);
491
+				$components = explode(',', $row['components']);
492 492
 			}
493 493
 			$calendar = [
494 494
 				'id' => $row['id'],
495 495
 				'uri' => $row['uri'],
496 496
 				'principaluri' => $this->convertPrincipal($row['principaluri'], !$this->legacyEndpoint),
497
-				'{' . Plugin::NS_CALENDARSERVER . '}getctag' => 'http://sabre.io/ns/sync/' . ($row['synctoken']?$row['synctoken']:'0'),
498
-				'{http://sabredav.org/ns}sync-token' => $row['synctoken']?$row['synctoken']:'0',
499
-				'{' . Plugin::NS_CALDAV . '}supported-calendar-component-set' => new SupportedCalendarComponentSet($components),
500
-				'{' . Plugin::NS_CALDAV . '}schedule-calendar-transp' => new ScheduleCalendarTransp($row['transparent']?'transparent':'opaque'),
497
+				'{'.Plugin::NS_CALENDARSERVER.'}getctag' => 'http://sabre.io/ns/sync/'.($row['synctoken'] ? $row['synctoken'] : '0'),
498
+				'{http://sabredav.org/ns}sync-token' => $row['synctoken'] ? $row['synctoken'] : '0',
499
+				'{'.Plugin::NS_CALDAV.'}supported-calendar-component-set' => new SupportedCalendarComponentSet($components),
500
+				'{'.Plugin::NS_CALDAV.'}schedule-calendar-transp' => new ScheduleCalendarTransp($row['transparent'] ? 'transparent' : 'opaque'),
501 501
 			];
502 502
 			foreach ($this->propertyMap as $xmlName => $dbName) {
503 503
 				$calendar[$xmlName] = $row[$dbName];
@@ -558,22 +558,22 @@  discard block
 block discarded – undo
558 558
 		while ($row = $result->fetch()) {
559 559
 			$row['principaluri'] = (string) $row['principaluri'];
560 560
 			[, $name] = Uri\split($row['principaluri']);
561
-			$row['displayname'] = $row['displayname'] . "($name)";
561
+			$row['displayname'] = $row['displayname']."($name)";
562 562
 			$components = [];
563 563
 			if ($row['components']) {
564
-				$components = explode(',',$row['components']);
564
+				$components = explode(',', $row['components']);
565 565
 			}
566 566
 			$calendar = [
567 567
 				'id' => $row['id'],
568 568
 				'uri' => $row['publicuri'],
569 569
 				'principaluri' => $this->convertPrincipal($row['principaluri'], !$this->legacyEndpoint),
570
-				'{' . Plugin::NS_CALENDARSERVER . '}getctag' => 'http://sabre.io/ns/sync/' . ($row['synctoken']?$row['synctoken']:'0'),
571
-				'{http://sabredav.org/ns}sync-token' => $row['synctoken']?$row['synctoken']:'0',
572
-				'{' . Plugin::NS_CALDAV . '}supported-calendar-component-set' => new SupportedCalendarComponentSet($components),
573
-				'{' . Plugin::NS_CALDAV . '}schedule-calendar-transp' => new ScheduleCalendarTransp($row['transparent']?'transparent':'opaque'),
574
-				'{' . \OCA\DAV\DAV\Sharing\Plugin::NS_OWNCLOUD . '}owner-principal' => $this->convertPrincipal($row['principaluri'], $this->legacyEndpoint),
575
-				'{' . \OCA\DAV\DAV\Sharing\Plugin::NS_OWNCLOUD . '}read-only' => (int)$row['access'] === Backend::ACCESS_READ,
576
-				'{' . \OCA\DAV\DAV\Sharing\Plugin::NS_OWNCLOUD . '}public' => (int)$row['access'] === self::ACCESS_PUBLIC,
570
+				'{'.Plugin::NS_CALENDARSERVER.'}getctag' => 'http://sabre.io/ns/sync/'.($row['synctoken'] ? $row['synctoken'] : '0'),
571
+				'{http://sabredav.org/ns}sync-token' => $row['synctoken'] ? $row['synctoken'] : '0',
572
+				'{'.Plugin::NS_CALDAV.'}supported-calendar-component-set' => new SupportedCalendarComponentSet($components),
573
+				'{'.Plugin::NS_CALDAV.'}schedule-calendar-transp' => new ScheduleCalendarTransp($row['transparent'] ? 'transparent' : 'opaque'),
574
+				'{'.\OCA\DAV\DAV\Sharing\Plugin::NS_OWNCLOUD.'}owner-principal' => $this->convertPrincipal($row['principaluri'], $this->legacyEndpoint),
575
+				'{'.\OCA\DAV\DAV\Sharing\Plugin::NS_OWNCLOUD.'}read-only' => (int) $row['access'] === Backend::ACCESS_READ,
576
+				'{'.\OCA\DAV\DAV\Sharing\Plugin::NS_OWNCLOUD.'}public' => (int) $row['access'] === self::ACCESS_PUBLIC,
577 577
 			];
578 578
 
579 579
 			foreach ($this->propertyMap as $xmlName => $dbName) {
@@ -621,27 +621,27 @@  discard block
 block discarded – undo
621 621
 		$result->closeCursor();
622 622
 
623 623
 		if ($row === false) {
624
-			throw new NotFound('Node with name \'' . $uri . '\' could not be found');
624
+			throw new NotFound('Node with name \''.$uri.'\' could not be found');
625 625
 		}
626 626
 
627 627
 		$row['principaluri'] = (string) $row['principaluri'];
628 628
 		[, $name] = Uri\split($row['principaluri']);
629
-		$row['displayname'] = $row['displayname'] . ' ' . "($name)";
629
+		$row['displayname'] = $row['displayname'].' '."($name)";
630 630
 		$components = [];
631 631
 		if ($row['components']) {
632
-			$components = explode(',',$row['components']);
632
+			$components = explode(',', $row['components']);
633 633
 		}
634 634
 		$calendar = [
635 635
 			'id' => $row['id'],
636 636
 			'uri' => $row['publicuri'],
637 637
 			'principaluri' => $this->convertPrincipal($row['principaluri'], !$this->legacyEndpoint),
638
-			'{' . Plugin::NS_CALENDARSERVER . '}getctag' => 'http://sabre.io/ns/sync/' . ($row['synctoken']?$row['synctoken']:'0'),
639
-			'{http://sabredav.org/ns}sync-token' => $row['synctoken']?$row['synctoken']:'0',
640
-			'{' . Plugin::NS_CALDAV . '}supported-calendar-component-set' => new SupportedCalendarComponentSet($components),
641
-			'{' . Plugin::NS_CALDAV . '}schedule-calendar-transp' => new ScheduleCalendarTransp($row['transparent']?'transparent':'opaque'),
642
-			'{' . \OCA\DAV\DAV\Sharing\Plugin::NS_OWNCLOUD . '}owner-principal' => $this->convertPrincipal($row['principaluri'], !$this->legacyEndpoint),
643
-			'{' . \OCA\DAV\DAV\Sharing\Plugin::NS_OWNCLOUD . '}read-only' => (int)$row['access'] === Backend::ACCESS_READ,
644
-			'{' . \OCA\DAV\DAV\Sharing\Plugin::NS_OWNCLOUD . '}public' => (int)$row['access'] === self::ACCESS_PUBLIC,
638
+			'{'.Plugin::NS_CALENDARSERVER.'}getctag' => 'http://sabre.io/ns/sync/'.($row['synctoken'] ? $row['synctoken'] : '0'),
639
+			'{http://sabredav.org/ns}sync-token' => $row['synctoken'] ? $row['synctoken'] : '0',
640
+			'{'.Plugin::NS_CALDAV.'}supported-calendar-component-set' => new SupportedCalendarComponentSet($components),
641
+			'{'.Plugin::NS_CALDAV.'}schedule-calendar-transp' => new ScheduleCalendarTransp($row['transparent'] ? 'transparent' : 'opaque'),
642
+			'{'.\OCA\DAV\DAV\Sharing\Plugin::NS_OWNCLOUD.'}owner-principal' => $this->convertPrincipal($row['principaluri'], !$this->legacyEndpoint),
643
+			'{'.\OCA\DAV\DAV\Sharing\Plugin::NS_OWNCLOUD.'}read-only' => (int) $row['access'] === Backend::ACCESS_READ,
644
+			'{'.\OCA\DAV\DAV\Sharing\Plugin::NS_OWNCLOUD.'}public' => (int) $row['access'] === self::ACCESS_PUBLIC,
645 645
 		];
646 646
 
647 647
 		foreach ($this->propertyMap as $xmlName => $dbName) {
@@ -685,17 +685,17 @@  discard block
 block discarded – undo
685 685
 		$row['principaluri'] = (string) $row['principaluri'];
686 686
 		$components = [];
687 687
 		if ($row['components']) {
688
-			$components = explode(',',$row['components']);
688
+			$components = explode(',', $row['components']);
689 689
 		}
690 690
 
691 691
 		$calendar = [
692 692
 			'id' => $row['id'],
693 693
 			'uri' => $row['uri'],
694 694
 			'principaluri' => $this->convertPrincipal($row['principaluri'], !$this->legacyEndpoint),
695
-			'{' . Plugin::NS_CALENDARSERVER . '}getctag' => 'http://sabre.io/ns/sync/' . ($row['synctoken']?$row['synctoken']:'0'),
696
-			'{http://sabredav.org/ns}sync-token' => $row['synctoken']?$row['synctoken']:'0',
697
-			'{' . Plugin::NS_CALDAV . '}supported-calendar-component-set' => new SupportedCalendarComponentSet($components),
698
-			'{' . Plugin::NS_CALDAV . '}schedule-calendar-transp' => new ScheduleCalendarTransp($row['transparent']?'transparent':'opaque'),
695
+			'{'.Plugin::NS_CALENDARSERVER.'}getctag' => 'http://sabre.io/ns/sync/'.($row['synctoken'] ? $row['synctoken'] : '0'),
696
+			'{http://sabredav.org/ns}sync-token' => $row['synctoken'] ? $row['synctoken'] : '0',
697
+			'{'.Plugin::NS_CALDAV.'}supported-calendar-component-set' => new SupportedCalendarComponentSet($components),
698
+			'{'.Plugin::NS_CALDAV.'}schedule-calendar-transp' => new ScheduleCalendarTransp($row['transparent'] ? 'transparent' : 'opaque'),
699 699
 		];
700 700
 
701 701
 		foreach ($this->propertyMap as $xmlName => $dbName) {
@@ -737,17 +737,17 @@  discard block
 block discarded – undo
737 737
 		$row['principaluri'] = (string) $row['principaluri'];
738 738
 		$components = [];
739 739
 		if ($row['components']) {
740
-			$components = explode(',',$row['components']);
740
+			$components = explode(',', $row['components']);
741 741
 		}
742 742
 
743 743
 		$calendar = [
744 744
 			'id' => $row['id'],
745 745
 			'uri' => $row['uri'],
746 746
 			'principaluri' => $this->convertPrincipal($row['principaluri'], !$this->legacyEndpoint),
747
-			'{' . Plugin::NS_CALENDARSERVER . '}getctag' => 'http://sabre.io/ns/sync/' . ($row['synctoken']?$row['synctoken']:'0'),
748
-			'{http://sabredav.org/ns}sync-token' => $row['synctoken']?$row['synctoken']:'0',
749
-			'{' . Plugin::NS_CALDAV . '}supported-calendar-component-set' => new SupportedCalendarComponentSet($components),
750
-			'{' . Plugin::NS_CALDAV . '}schedule-calendar-transp' => new ScheduleCalendarTransp($row['transparent']?'transparent':'opaque'),
747
+			'{'.Plugin::NS_CALENDARSERVER.'}getctag' => 'http://sabre.io/ns/sync/'.($row['synctoken'] ? $row['synctoken'] : '0'),
748
+			'{http://sabredav.org/ns}sync-token' => $row['synctoken'] ? $row['synctoken'] : '0',
749
+			'{'.Plugin::NS_CALDAV.'}supported-calendar-component-set' => new SupportedCalendarComponentSet($components),
750
+			'{'.Plugin::NS_CALDAV.'}schedule-calendar-transp' => new ScheduleCalendarTransp($row['transparent'] ? 'transparent' : 'opaque'),
751 751
 		];
752 752
 
753 753
 		foreach ($this->propertyMap as $xmlName => $dbName) {
@@ -792,8 +792,8 @@  discard block
 block discarded – undo
792 792
 			'principaluri' => $row['principaluri'],
793 793
 			'source' => $row['source'],
794 794
 			'lastmodified' => $row['lastmodified'],
795
-			'{' . Plugin::NS_CALDAV . '}supported-calendar-component-set' => new SupportedCalendarComponentSet(['VTODO', 'VEVENT']),
796
-			'{http://sabredav.org/ns}sync-token' => $row['synctoken']?$row['synctoken']:'0',
795
+			'{'.Plugin::NS_CALDAV.'}supported-calendar-component-set' => new SupportedCalendarComponentSet(['VTODO', 'VEVENT']),
796
+			'{http://sabredav.org/ns}sync-token' => $row['synctoken'] ? $row['synctoken'] : '0',
797 797
 		];
798 798
 
799 799
 		foreach ($this->subscriptionPropertyMap as $xmlName => $dbName) {
@@ -830,16 +830,16 @@  discard block
 block discarded – undo
830 830
 		$sccs = '{urn:ietf:params:xml:ns:caldav}supported-calendar-component-set';
831 831
 		if (isset($properties[$sccs])) {
832 832
 			if (!($properties[$sccs] instanceof SupportedCalendarComponentSet)) {
833
-				throw new DAV\Exception('The ' . $sccs . ' property must be of type: \Sabre\CalDAV\Property\SupportedCalendarComponentSet');
833
+				throw new DAV\Exception('The '.$sccs.' property must be of type: \Sabre\CalDAV\Property\SupportedCalendarComponentSet');
834 834
 			}
835
-			$values['components'] = implode(',',$properties[$sccs]->getValue());
835
+			$values['components'] = implode(',', $properties[$sccs]->getValue());
836 836
 		} elseif (isset($properties['components'])) {
837 837
 			// Allow to provide components internally without having
838 838
 			// to create a SupportedCalendarComponentSet object
839 839
 			$values['components'] = $properties['components'];
840 840
 		}
841 841
 
842
-		$transp = '{' . Plugin::NS_CALDAV . '}schedule-calendar-transp';
842
+		$transp = '{'.Plugin::NS_CALDAV.'}schedule-calendar-transp';
843 843
 		if (isset($properties[$transp])) {
844 844
 			$values['transparent'] = (int) ($properties[$transp]->getValue() === 'transparent');
845 845
 		}
@@ -859,7 +859,7 @@  discard block
 block discarded – undo
859 859
 		$calendarId = $query->getLastInsertId();
860 860
 
861 861
 		$calendarData = $this->getCalendarById($calendarId);
862
-		$this->dispatcher->dispatchTyped(new CalendarCreatedEvent((int)$calendarId, $calendarData));
862
+		$this->dispatcher->dispatchTyped(new CalendarCreatedEvent((int) $calendarId, $calendarData));
863 863
 
864 864
 		return $calendarId;
865 865
 	}
@@ -882,13 +882,13 @@  discard block
 block discarded – undo
882 882
 	 */
883 883
 	public function updateCalendar($calendarId, PropPatch $propPatch) {
884 884
 		$supportedProperties = array_keys($this->propertyMap);
885
-		$supportedProperties[] = '{' . Plugin::NS_CALDAV . '}schedule-calendar-transp';
885
+		$supportedProperties[] = '{'.Plugin::NS_CALDAV.'}schedule-calendar-transp';
886 886
 
887
-		$propPatch->handle($supportedProperties, function ($mutations) use ($calendarId) {
887
+		$propPatch->handle($supportedProperties, function($mutations) use ($calendarId) {
888 888
 			$newValues = [];
889 889
 			foreach ($mutations as $propertyName => $propertyValue) {
890 890
 				switch ($propertyName) {
891
-					case '{' . Plugin::NS_CALDAV . '}schedule-calendar-transp':
891
+					case '{'.Plugin::NS_CALDAV.'}schedule-calendar-transp':
892 892
 						$fieldName = 'transparent';
893 893
 						$newValues[$fieldName] = (int) ($propertyValue->getValue() === 'transparent');
894 894
 						break;
@@ -910,7 +910,7 @@  discard block
 block discarded – undo
910 910
 
911 911
 			$calendarData = $this->getCalendarById($calendarId);
912 912
 			$shares = $this->getShares($calendarId);
913
-			$this->dispatcher->dispatchTyped(new CalendarUpdatedEvent((int)$calendarId, $calendarData, $shares, $mutations));
913
+			$this->dispatcher->dispatchTyped(new CalendarUpdatedEvent((int) $calendarId, $calendarData, $shares, $mutations));
914 914
 
915 915
 			return true;
916 916
 		});
@@ -960,7 +960,7 @@  discard block
 block discarded – undo
960 960
 
961 961
 			// Only dispatch if we actually deleted anything
962 962
 			if ($calendarData) {
963
-				$this->dispatcher->dispatchTyped(new CalendarDeletedEvent((int)$calendarId, $calendarData, $shares));
963
+				$this->dispatcher->dispatchTyped(new CalendarDeletedEvent((int) $calendarId, $calendarData, $shares));
964 964
 			}
965 965
 		} else {
966 966
 			$qbMarkCalendarDeleted = $this->db->getQueryBuilder();
@@ -973,7 +973,7 @@  discard block
 block discarded – undo
973 973
 			$shares = $this->getShares($calendarId);
974 974
 			if ($calendarData) {
975 975
 				$this->dispatcher->dispatchTyped(new CalendarMovedToTrashEvent(
976
-					(int)$calendarId,
976
+					(int) $calendarId,
977 977
 					$calendarData,
978 978
 					$shares
979 979
 				));
@@ -1057,11 +1057,11 @@  discard block
 block discarded – undo
1057 1057
 				'id' => $row['id'],
1058 1058
 				'uri' => $row['uri'],
1059 1059
 				'lastmodified' => $row['lastmodified'],
1060
-				'etag' => '"' . $row['etag'] . '"',
1060
+				'etag' => '"'.$row['etag'].'"',
1061 1061
 				'calendarid' => $row['calendarid'],
1062
-				'size' => (int)$row['size'],
1062
+				'size' => (int) $row['size'],
1063 1063
 				'component' => strtolower($row['componenttype']),
1064
-				'classification' => (int)$row['classification']
1064
+				'classification' => (int) $row['classification']
1065 1065
 			];
1066 1066
 		}
1067 1067
 		$stmt->closeCursor();
@@ -1084,13 +1084,13 @@  discard block
 block discarded – undo
1084 1084
 				'id' => $row['id'],
1085 1085
 				'uri' => $row['uri'],
1086 1086
 				'lastmodified' => $row['lastmodified'],
1087
-				'etag' => '"' . $row['etag'] . '"',
1087
+				'etag' => '"'.$row['etag'].'"',
1088 1088
 				'calendarid' => (int) $row['calendarid'],
1089 1089
 				'calendartype' => (int) $row['calendartype'],
1090 1090
 				'size' => (int) $row['size'],
1091 1091
 				'component' => strtolower($row['componenttype']),
1092 1092
 				'classification' => (int) $row['classification'],
1093
-				'{' . \OCA\DAV\DAV\Sharing\Plugin::NS_NEXTCLOUD . '}deleted-at' => $row['deleted_at'],
1093
+				'{'.\OCA\DAV\DAV\Sharing\Plugin::NS_NEXTCLOUD.'}deleted-at' => $row['deleted_at'],
1094 1094
 			];
1095 1095
 		}
1096 1096
 		$stmt->closeCursor();
@@ -1114,13 +1114,13 @@  discard block
 block discarded – undo
1114 1114
 				'id' => $row['id'],
1115 1115
 				'uri' => $row['uri'],
1116 1116
 				'lastmodified' => $row['lastmodified'],
1117
-				'etag' => '"' . $row['etag'] . '"',
1117
+				'etag' => '"'.$row['etag'].'"',
1118 1118
 				'calendarid' => $row['calendarid'],
1119 1119
 				'calendaruri' => $row['calendaruri'],
1120
-				'size' => (int)$row['size'],
1120
+				'size' => (int) $row['size'],
1121 1121
 				'component' => strtolower($row['componenttype']),
1122
-				'classification' => (int)$row['classification'],
1123
-				'{' . \OCA\DAV\DAV\Sharing\Plugin::NS_NEXTCLOUD . '}deleted-at' => $row['deleted_at'],
1122
+				'classification' => (int) $row['classification'],
1123
+				'{'.\OCA\DAV\DAV\Sharing\Plugin::NS_NEXTCLOUD.'}deleted-at' => $row['deleted_at'],
1124 1124
 			];
1125 1125
 		}
1126 1126
 		$stmt->closeCursor();
@@ -1164,12 +1164,12 @@  discard block
 block discarded – undo
1164 1164
 			'id' => $row['id'],
1165 1165
 			'uri' => $row['uri'],
1166 1166
 			'lastmodified' => $row['lastmodified'],
1167
-			'etag' => '"' . $row['etag'] . '"',
1167
+			'etag' => '"'.$row['etag'].'"',
1168 1168
 			'calendarid' => $row['calendarid'],
1169
-			'size' => (int)$row['size'],
1169
+			'size' => (int) $row['size'],
1170 1170
 			'calendardata' => $this->readBlob($row['calendardata']),
1171 1171
 			'component' => strtolower($row['componenttype']),
1172
-			'classification' => (int)$row['classification']
1172
+			'classification' => (int) $row['classification']
1173 1173
 		];
1174 1174
 	}
1175 1175
 
@@ -1211,12 +1211,12 @@  discard block
 block discarded – undo
1211 1211
 					'id' => $row['id'],
1212 1212
 					'uri' => $row['uri'],
1213 1213
 					'lastmodified' => $row['lastmodified'],
1214
-					'etag' => '"' . $row['etag'] . '"',
1214
+					'etag' => '"'.$row['etag'].'"',
1215 1215
 					'calendarid' => $row['calendarid'],
1216
-					'size' => (int)$row['size'],
1216
+					'size' => (int) $row['size'],
1217 1217
 					'calendardata' => $this->readBlob($row['calendardata']),
1218 1218
 					'component' => strtolower($row['componenttype']),
1219
-					'classification' => (int)$row['classification']
1219
+					'classification' => (int) $row['classification']
1220 1220
 				];
1221 1221
 			}
1222 1222
 			$result->closeCursor();
@@ -1303,11 +1303,11 @@  discard block
 block discarded – undo
1303 1303
 			$calendarRow = $this->getCalendarById($calendarId);
1304 1304
 			$shares = $this->getShares($calendarId);
1305 1305
 
1306
-			$this->dispatcher->dispatchTyped(new CalendarObjectCreatedEvent((int)$calendarId, $calendarRow, $shares, $objectRow));
1306
+			$this->dispatcher->dispatchTyped(new CalendarObjectCreatedEvent((int) $calendarId, $calendarRow, $shares, $objectRow));
1307 1307
 		} else {
1308 1308
 			$subscriptionRow = $this->getSubscriptionById($calendarId);
1309 1309
 
1310
-			$this->dispatcher->dispatchTyped(new CachedCalendarObjectCreatedEvent((int)$calendarId, $subscriptionRow, [], $objectRow));
1310
+			$this->dispatcher->dispatchTyped(new CachedCalendarObjectCreatedEvent((int) $calendarId, $subscriptionRow, [], $objectRow));
1311 1311
 			$this->legacyDispatcher->dispatch('\OCA\DAV\CalDAV\CalDavBackend::createCachedCalendarObject', new GenericEvent(
1312 1312
 				'\OCA\DAV\CalDAV\CalDavBackend::createCachedCalendarObject',
1313 1313
 				[
@@ -1319,7 +1319,7 @@  discard block
 block discarded – undo
1319 1319
 			));
1320 1320
 		}
1321 1321
 
1322
-		return '"' . $extraData['etag'] . '"';
1322
+		return '"'.$extraData['etag'].'"';
1323 1323
 	}
1324 1324
 
1325 1325
 	/**
@@ -1368,11 +1368,11 @@  discard block
 block discarded – undo
1368 1368
 				$calendarRow = $this->getCalendarById($calendarId);
1369 1369
 				$shares = $this->getShares($calendarId);
1370 1370
 
1371
-				$this->dispatcher->dispatchTyped(new CalendarObjectUpdatedEvent((int)$calendarId, $calendarRow, $shares, $objectRow));
1371
+				$this->dispatcher->dispatchTyped(new CalendarObjectUpdatedEvent((int) $calendarId, $calendarRow, $shares, $objectRow));
1372 1372
 			} else {
1373 1373
 				$subscriptionRow = $this->getSubscriptionById($calendarId);
1374 1374
 
1375
-				$this->dispatcher->dispatchTyped(new CachedCalendarObjectUpdatedEvent((int)$calendarId, $subscriptionRow, [], $objectRow));
1375
+				$this->dispatcher->dispatchTyped(new CachedCalendarObjectUpdatedEvent((int) $calendarId, $subscriptionRow, [], $objectRow));
1376 1376
 				$this->legacyDispatcher->dispatch('\OCA\DAV\CalDAV\CalDavBackend::updateCachedCalendarObject', new GenericEvent(
1377 1377
 					'\OCA\DAV\CalDAV\CalDavBackend::updateCachedCalendarObject',
1378 1378
 					[
@@ -1385,7 +1385,7 @@  discard block
 block discarded – undo
1385 1385
 			}
1386 1386
 		}
1387 1387
 
1388
-		return '"' . $extraData['etag'] . '"';
1388
+		return '"'.$extraData['etag'].'"';
1389 1389
 	}
1390 1390
 
1391 1391
 	/**
@@ -1434,11 +1434,11 @@  discard block
 block discarded – undo
1434 1434
 				$calendarRow = $this->getCalendarById($calendarId);
1435 1435
 				$shares = $this->getShares($calendarId);
1436 1436
 
1437
-				$this->dispatcher->dispatchTyped(new CalendarObjectDeletedEvent((int)$calendarId, $calendarRow, $shares, $data));
1437
+				$this->dispatcher->dispatchTyped(new CalendarObjectDeletedEvent((int) $calendarId, $calendarRow, $shares, $data));
1438 1438
 			} else {
1439 1439
 				$subscriptionRow = $this->getSubscriptionById($calendarId);
1440 1440
 
1441
-				$this->dispatcher->dispatchTyped(new CachedCalendarObjectDeletedEvent((int)$calendarId, $subscriptionRow, [], $data));
1441
+				$this->dispatcher->dispatchTyped(new CachedCalendarObjectDeletedEvent((int) $calendarId, $subscriptionRow, [], $data));
1442 1442
 				$this->legacyDispatcher->dispatch('\OCA\DAV\CalDAV\CalDavBackend::deleteCachedCalendarObject', new GenericEvent(
1443 1443
 					'\OCA\DAV\CalDAV\CalDavBackend::deleteCachedCalendarObject',
1444 1444
 					[
@@ -1487,7 +1487,7 @@  discard block
 block discarded – undo
1487 1487
 			if ($calendarData !== null) {
1488 1488
 				$this->dispatcher->dispatchTyped(
1489 1489
 					new CalendarObjectMovedToTrashEvent(
1490
-						(int)$calendarId,
1490
+						(int) $calendarId,
1491 1491
 						$calendarData,
1492 1492
 						$this->getShares($calendarId),
1493 1493
 						$data
@@ -1802,7 +1802,7 @@  discard block
 block discarded – undo
1802 1802
 
1803 1803
 		$result = [];
1804 1804
 		while ($row = $stmt->fetch()) {
1805
-			$path = $uriMapper[$row['calendarid']] . '/' . $row['uri'];
1805
+			$path = $uriMapper[$row['calendarid']].'/'.$row['uri'];
1806 1806
 			if (!in_array($path, $result)) {
1807 1807
 				$result[] = $path;
1808 1808
 			}
@@ -1850,8 +1850,8 @@  discard block
 block discarded – undo
1850 1850
 
1851 1851
 		if ($pattern !== '') {
1852 1852
 			$innerQuery->andWhere($innerQuery->expr()->iLike('op.value',
1853
-				$outerQuery->createNamedParameter('%' .
1854
-					$this->db->escapeLikeParameter($pattern) . '%')));
1853
+				$outerQuery->createNamedParameter('%'.
1854
+					$this->db->escapeLikeParameter($pattern).'%')));
1855 1855
 		}
1856 1856
 
1857 1857
 		$outerQuery->select('c.id', 'c.calendardata', 'c.componenttype', 'c.uid', 'c.uri')
@@ -1891,7 +1891,7 @@  discard block
 block discarded – undo
1891 1891
 		$result = $outerQuery->executeQuery();
1892 1892
 		$calendarObjects = $result->fetchAll();
1893 1893
 
1894
-		return array_map(function ($o) {
1894
+		return array_map(function($o) {
1895 1895
 			$calendarData = Reader::read($o['calendardata']);
1896 1896
 			$comps = $calendarData->getComponents();
1897 1897
 			$objects = [];
@@ -1909,10 +1909,10 @@  discard block
 block discarded – undo
1909 1909
 				'type' => $o['componenttype'],
1910 1910
 				'uid' => $o['uid'],
1911 1911
 				'uri' => $o['uri'],
1912
-				'objects' => array_map(function ($c) {
1912
+				'objects' => array_map(function($c) {
1913 1913
 					return $this->transformSearchData($c);
1914 1914
 				}, $objects),
1915
-				'timezones' => array_map(function ($c) {
1915
+				'timezones' => array_map(function($c) {
1916 1916
 					return $this->transformSearchData($c);
1917 1917
 				}, $timezones),
1918 1918
 			];
@@ -1928,7 +1928,7 @@  discard block
 block discarded – undo
1928 1928
 		/** @var Component[] $subComponents */
1929 1929
 		$subComponents = $comp->getComponents();
1930 1930
 		/** @var Property[] $properties */
1931
-		$properties = array_filter($comp->children(), function ($c) {
1931
+		$properties = array_filter($comp->children(), function($c) {
1932 1932
 			return $c instanceof Property;
1933 1933
 		});
1934 1934
 		$validationRules = $comp->getValidationRules();
@@ -2006,7 +2006,7 @@  discard block
 block discarded – undo
2006 2006
 		$subscriptions = $this->getSubscriptionsForUser($principalUri);
2007 2007
 		foreach ($calendars as $calendar) {
2008 2008
 			$calendarAnd = $calendarObjectIdQuery->expr()->andX();
2009
-			$calendarAnd->add($calendarObjectIdQuery->expr()->eq('cob.calendarid', $calendarObjectIdQuery->createNamedParameter((int)$calendar['id'])));
2009
+			$calendarAnd->add($calendarObjectIdQuery->expr()->eq('cob.calendarid', $calendarObjectIdQuery->createNamedParameter((int) $calendar['id'])));
2010 2010
 			$calendarAnd->add($calendarObjectIdQuery->expr()->eq('cob.calendartype', $calendarObjectIdQuery->createNamedParameter(self::CALENDAR_TYPE_CALENDAR)));
2011 2011
 
2012 2012
 			// If it's shared, limit search to public events
@@ -2019,7 +2019,7 @@  discard block
 block discarded – undo
2019 2019
 		}
2020 2020
 		foreach ($subscriptions as $subscription) {
2021 2021
 			$subscriptionAnd = $calendarObjectIdQuery->expr()->andX();
2022
-			$subscriptionAnd->add($calendarObjectIdQuery->expr()->eq('cob.calendarid', $calendarObjectIdQuery->createNamedParameter((int)$subscription['id'])));
2022
+			$subscriptionAnd->add($calendarObjectIdQuery->expr()->eq('cob.calendarid', $calendarObjectIdQuery->createNamedParameter((int) $subscription['id'])));
2023 2023
 			$subscriptionAnd->add($calendarObjectIdQuery->expr()->eq('cob.calendartype', $calendarObjectIdQuery->createNamedParameter(self::CALENDAR_TYPE_SUBSCRIPTION)));
2024 2024
 
2025 2025
 			// If it's shared, limit search to public events
@@ -2065,7 +2065,7 @@  discard block
 block discarded – undo
2065 2065
 			if (!$escapePattern) {
2066 2066
 				$calendarObjectIdQuery->andWhere($calendarObjectIdQuery->expr()->ilike('cob.value', $calendarObjectIdQuery->createNamedParameter($pattern)));
2067 2067
 			} else {
2068
-				$calendarObjectIdQuery->andWhere($calendarObjectIdQuery->expr()->ilike('cob.value', $calendarObjectIdQuery->createNamedParameter('%' . $this->db->escapeLikeParameter($pattern) . '%')));
2068
+				$calendarObjectIdQuery->andWhere($calendarObjectIdQuery->expr()->ilike('cob.value', $calendarObjectIdQuery->createNamedParameter('%'.$this->db->escapeLikeParameter($pattern).'%')));
2069 2069
 			}
2070 2070
 		}
2071 2071
 
@@ -2079,7 +2079,7 @@  discard block
 block discarded – undo
2079 2079
 		$result = $calendarObjectIdQuery->executeQuery();
2080 2080
 		$matches = $result->fetchAll();
2081 2081
 		$result->closeCursor();
2082
-		$matches = array_map(static function (array $match):int {
2082
+		$matches = array_map(static function(array $match):int {
2083 2083
 			return (int) $match['objectid'];
2084 2084
 		}, $matches);
2085 2085
 
@@ -2092,9 +2092,9 @@  discard block
 block discarded – undo
2092 2092
 		$calendarObjects = $result->fetchAll();
2093 2093
 		$result->closeCursor();
2094 2094
 
2095
-		return array_map(function (array $array): array {
2096
-			$array['calendarid'] = (int)$array['calendarid'];
2097
-			$array['calendartype'] = (int)$array['calendartype'];
2095
+		return array_map(function(array $array): array {
2096
+			$array['calendarid'] = (int) $array['calendarid'];
2097
+			$array['calendartype'] = (int) $array['calendartype'];
2098 2098
 			$array['calendardata'] = $this->readBlob($array['calendardata']);
2099 2099
 
2100 2100
 			return $array;
@@ -2132,7 +2132,7 @@  discard block
 block discarded – undo
2132 2132
 		$row = $stmt->fetch();
2133 2133
 		$stmt->closeCursor();
2134 2134
 		if ($row) {
2135
-			return $row['calendaruri'] . '/' . $row['objecturi'];
2135
+			return $row['calendaruri'].'/'.$row['objecturi'];
2136 2136
 		}
2137 2137
 
2138 2138
 		return null;
@@ -2158,13 +2158,13 @@  discard block
 block discarded – undo
2158 2158
 			'id' => $row['id'],
2159 2159
 			'uri' => $row['uri'],
2160 2160
 			'lastmodified' => $row['lastmodified'],
2161
-			'etag' => '"' . $row['etag'] . '"',
2161
+			'etag' => '"'.$row['etag'].'"',
2162 2162
 			'calendarid' => $row['calendarid'],
2163 2163
 			'calendaruri' => $row['calendaruri'],
2164
-			'size' => (int)$row['size'],
2164
+			'size' => (int) $row['size'],
2165 2165
 			'calendardata' => $this->readBlob($row['calendardata']),
2166 2166
 			'component' => strtolower($row['componenttype']),
2167
-			'classification' => (int)$row['classification'],
2167
+			'classification' => (int) $row['classification'],
2168 2168
 			'deleted_at' => isset($row['deleted_at']) ? ((int) $row['deleted_at']) : null,
2169 2169
 		];
2170 2170
 	}
@@ -2364,8 +2364,8 @@  discard block
 block discarded – undo
2364 2364
 				'source' => $row['source'],
2365 2365
 				'lastmodified' => $row['lastmodified'],
2366 2366
 
2367
-				'{' . Plugin::NS_CALDAV . '}supported-calendar-component-set' => new SupportedCalendarComponentSet(['VTODO', 'VEVENT']),
2368
-				'{http://sabredav.org/ns}sync-token' => $row['synctoken']?$row['synctoken']:'0',
2367
+				'{'.Plugin::NS_CALDAV.'}supported-calendar-component-set' => new SupportedCalendarComponentSet(['VTODO', 'VEVENT']),
2368
+				'{http://sabredav.org/ns}sync-token' => $row['synctoken'] ? $row['synctoken'] : '0',
2369 2369
 			];
2370 2370
 
2371 2371
 			foreach ($this->subscriptionPropertyMap as $xmlName => $dbName) {
@@ -2460,7 +2460,7 @@  discard block
 block discarded – undo
2460 2460
 		$supportedProperties = array_keys($this->subscriptionPropertyMap);
2461 2461
 		$supportedProperties[] = '{http://calendarserver.org/ns/}source';
2462 2462
 
2463
-		$propPatch->handle($supportedProperties, function ($mutations) use ($subscriptionId) {
2463
+		$propPatch->handle($supportedProperties, function($mutations) use ($subscriptionId) {
2464 2464
 			$newValues = [];
2465 2465
 
2466 2466
 			foreach ($mutations as $propertyName => $propertyValue) {
@@ -2482,7 +2482,7 @@  discard block
 block discarded – undo
2482 2482
 				->executeStatement();
2483 2483
 
2484 2484
 			$subscriptionRow = $this->getSubscriptionById($subscriptionId);
2485
-			$this->dispatcher->dispatchTyped(new SubscriptionUpdatedEvent((int)$subscriptionId, $subscriptionRow, [], $mutations));
2485
+			$this->dispatcher->dispatchTyped(new SubscriptionUpdatedEvent((int) $subscriptionId, $subscriptionRow, [], $mutations));
2486 2486
 			$this->legacyDispatcher->dispatch('\OCA\DAV\CalDAV\CalDavBackend::updateSubscription', new GenericEvent(
2487 2487
 				'\OCA\DAV\CalDAV\CalDavBackend::updateSubscription',
2488 2488
 				[
@@ -2533,7 +2533,7 @@  discard block
 block discarded – undo
2533 2533
 			->executeStatement();
2534 2534
 
2535 2535
 		if ($subscriptionRow) {
2536
-			$this->dispatcher->dispatchTyped(new SubscriptionDeletedEvent((int)$subscriptionId, $subscriptionRow, []));
2536
+			$this->dispatcher->dispatchTyped(new SubscriptionDeletedEvent((int) $subscriptionId, $subscriptionRow, []));
2537 2537
 		}
2538 2538
 	}
2539 2539
 
@@ -2571,8 +2571,8 @@  discard block
 block discarded – undo
2571 2571
 			'uri' => $row['uri'],
2572 2572
 			'calendardata' => $row['calendardata'],
2573 2573
 			'lastmodified' => $row['lastmodified'],
2574
-			'etag' => '"' . $row['etag'] . '"',
2575
-			'size' => (int)$row['size'],
2574
+			'etag' => '"'.$row['etag'].'"',
2575
+			'size' => (int) $row['size'],
2576 2576
 		];
2577 2577
 	}
2578 2578
 
@@ -2600,8 +2600,8 @@  discard block
 block discarded – undo
2600 2600
 				'calendardata' => $row['calendardata'],
2601 2601
 				'uri' => $row['uri'],
2602 2602
 				'lastmodified' => $row['lastmodified'],
2603
-				'etag' => '"' . $row['etag'] . '"',
2604
-				'size' => (int)$row['size'],
2603
+				'etag' => '"'.$row['etag'].'"',
2604
+				'size' => (int) $row['size'],
2605 2605
 			];
2606 2606
 		}
2607 2607
 
@@ -2655,14 +2655,14 @@  discard block
 block discarded – undo
2655 2655
 	 * @return void
2656 2656
 	 */
2657 2657
 	protected function addChange($calendarId, $objectUri, $operation, $calendarType = self::CALENDAR_TYPE_CALENDAR) {
2658
-		$table = $calendarType === self::CALENDAR_TYPE_CALENDAR ? 'calendars': 'calendarsubscriptions';
2658
+		$table = $calendarType === self::CALENDAR_TYPE_CALENDAR ? 'calendars' : 'calendarsubscriptions';
2659 2659
 
2660 2660
 		$query = $this->db->getQueryBuilder();
2661 2661
 		$query->select('synctoken')
2662 2662
 			->from($table)
2663 2663
 			->where($query->expr()->eq('id', $query->createNamedParameter($calendarId)));
2664 2664
 		$result = $query->executeQuery();
2665
-		$syncToken = (int)$result->fetchOne();
2665
+		$syncToken = (int) $result->fetchOne();
2666 2666
 		$result->closeCursor();
2667 2667
 
2668 2668
 		$query = $this->db->getQueryBuilder();
@@ -2719,7 +2719,7 @@  discard block
 block discarded – undo
2719 2719
 				// Track first component type and uid
2720 2720
 				if ($uid === null) {
2721 2721
 					$componentType = $component->name;
2722
-					$uid = (string)$component->UID;
2722
+					$uid = (string) $component->UID;
2723 2723
 				}
2724 2724
 			}
2725 2725
 		}
@@ -2818,7 +2818,7 @@  discard block
 block discarded – undo
2818 2818
 			]));
2819 2819
 		$this->calendarSharingBackend->updateShares($shareable, $add, $remove);
2820 2820
 
2821
-		$this->dispatcher->dispatchTyped(new CalendarShareUpdatedEvent((int)$calendarId, $calendarRow, $oldShares, $add, $remove));
2821
+		$this->dispatcher->dispatchTyped(new CalendarShareUpdatedEvent((int) $calendarId, $calendarRow, $oldShares, $add, $remove));
2822 2822
 	}
2823 2823
 
2824 2824
 	/**
@@ -2858,7 +2858,7 @@  discard block
 block discarded – undo
2858 2858
 				]);
2859 2859
 			$query->executeStatement();
2860 2860
 
2861
-			$this->dispatcher->dispatchTyped(new CalendarPublishedEvent((int)$calendarId, $calendarData, $publicUri));
2861
+			$this->dispatcher->dispatchTyped(new CalendarPublishedEvent((int) $calendarId, $calendarData, $publicUri));
2862 2862
 			return $publicUri;
2863 2863
 		}
2864 2864
 		$query->delete('dav_shares')
@@ -2866,7 +2866,7 @@  discard block
 block discarded – undo
2866 2866
 			->andWhere($query->expr()->eq('access', $query->createNamedParameter(self::ACCESS_PUBLIC)));
2867 2867
 		$query->executeStatement();
2868 2868
 
2869
-		$this->dispatcher->dispatchTyped(new CalendarUnpublishedEvent((int)$calendarId, $calendarData));
2869
+		$this->dispatcher->dispatchTyped(new CalendarUnpublishedEvent((int) $calendarId, $calendarData));
2870 2870
 		return null;
2871 2871
 	}
2872 2872
 
@@ -3092,10 +3092,10 @@  discard block
 block discarded – undo
3092 3092
 		$result->closeCursor();
3093 3093
 
3094 3094
 		if (!isset($objectIds['id'])) {
3095
-			throw new \InvalidArgumentException('Calendarobject does not exists: ' . $uri);
3095
+			throw new \InvalidArgumentException('Calendarobject does not exists: '.$uri);
3096 3096
 		}
3097 3097
 
3098
-		return (int)$objectIds['id'];
3098
+		return (int) $objectIds['id'];
3099 3099
 	}
3100 3100
 
3101 3101
 	/**
@@ -3121,8 +3121,8 @@  discard block
 block discarded – undo
3121 3121
 	 *
3122 3122
 	 */
3123 3123
 	private function addOwnerPrincipalToCalendar(array $calendarInfo): array {
3124
-		$ownerPrincipalKey = '{' . \OCA\DAV\DAV\Sharing\Plugin::NS_OWNCLOUD . '}owner-principal';
3125
-		$displaynameKey = '{' . \OCA\DAV\DAV\Sharing\Plugin::NS_NEXTCLOUD . '}owner-displayname';
3124
+		$ownerPrincipalKey = '{'.\OCA\DAV\DAV\Sharing\Plugin::NS_OWNCLOUD.'}owner-principal';
3125
+		$displaynameKey = '{'.\OCA\DAV\DAV\Sharing\Plugin::NS_NEXTCLOUD.'}owner-displayname';
3126 3126
 		if (isset($calendarInfo[$ownerPrincipalKey])) {
3127 3127
 			$uri = $calendarInfo[$ownerPrincipalKey];
3128 3128
 		} else {
Please login to merge, or discard this patch.