summaryrefslogtreecommitdiffstats
path: root/apps/dav/lib/CardDAV/SyncService.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/dav/lib/CardDAV/SyncService.php')
-rw-r--r--apps/dav/lib/CardDAV/SyncService.php23
1 files changed, 10 insertions, 13 deletions
diff --git a/apps/dav/lib/CardDAV/SyncService.php b/apps/dav/lib/CardDAV/SyncService.php
index c0241de2076..daced49373e 100644
--- a/apps/dav/lib/CardDAV/SyncService.php
+++ b/apps/dav/lib/CardDAV/SyncService.php
@@ -196,17 +196,17 @@ class SyncService {
* @param string $syncToken
* @return array
*/
- protected function requestSyncReport($url, $userName, $addressBookUrl, $sharedSecret, $syncToken) {
- $client = $this->getClient($url, $userName, $sharedSecret);
+ protected function requestSyncReport($url, $userName, $addressBookUrl, $sharedSecret, $syncToken) {
+ $client = $this->getClient($url, $userName, $sharedSecret);
- $body = $this->buildSyncCollectionRequestBody($syncToken);
+ $body = $this->buildSyncCollectionRequestBody($syncToken);
- $response = $client->request('REPORT', $addressBookUrl, $body, [
- 'Content-Type' => 'application/xml'
- ]);
+ $response = $client->request('REPORT', $addressBookUrl, $body, [
+ 'Content-Type' => 'application/xml'
+ ]);
- return $this->parseMultiStatus($response['body']);
- }
+ return $this->parseMultiStatus($response['body']);
+ }
/**
* @param string $url
@@ -225,7 +225,6 @@ class SyncService {
* @return string
*/
private function buildSyncCollectionRequestBody($syncToken) {
-
$dom = new \DOMDocument('1.0', 'UTF-8');
$dom->formatOutput = true;
$root = $dom->createElementNS('DAV:', 'd:sync-collection');
@@ -297,7 +296,7 @@ class SyncService {
*/
public function deleteUser($userOrCardId) {
$systemAddressBook = $this->getLocalSystemAddressBook();
- if ($userOrCardId instanceof IUser){
+ if ($userOrCardId instanceof IUser) {
$name = $userOrCardId->getBackendClassName();
$userId = $userOrCardId->getUID();
@@ -331,7 +330,7 @@ class SyncService {
// remove no longer existing
$allCards = $this->backend->getCards($systemAddressBook['id']);
- foreach($allCards as $card) {
+ foreach ($allCards as $card) {
$vCard = Reader::read($card['carddata']);
$uid = $vCard->UID->getValue();
// load backend and see if user exists
@@ -340,6 +339,4 @@ class SyncService {
}
}
}
-
-
}