summaryrefslogtreecommitdiffstats
path: root/apps/dav/lib/Connector
diff options
context:
space:
mode:
Diffstat (limited to 'apps/dav/lib/Connector')
-rw-r--r--apps/dav/lib/Connector/Sabre/CommentPropertiesPlugin.php6
-rw-r--r--apps/dav/lib/Connector/Sabre/FakeLockerPlugin.php4
-rw-r--r--apps/dav/lib/Connector/Sabre/FilesPlugin.php42
-rw-r--r--apps/dav/lib/Connector/Sabre/Principal.php10
-rw-r--r--apps/dav/lib/Connector/Sabre/SharesPlugin.php4
-rw-r--r--apps/dav/lib/Connector/Sabre/TagsPlugin.php8
6 files changed, 37 insertions, 37 deletions
diff --git a/apps/dav/lib/Connector/Sabre/CommentPropertiesPlugin.php b/apps/dav/lib/Connector/Sabre/CommentPropertiesPlugin.php
index a479d0ff965..51d453e3f2a 100644
--- a/apps/dav/lib/Connector/Sabre/CommentPropertiesPlugin.php
+++ b/apps/dav/lib/Connector/Sabre/CommentPropertiesPlugin.php
@@ -99,15 +99,15 @@ class CommentPropertiesPlugin extends ServerPlugin {
}
}
- $propFind->handle(self::PROPERTY_NAME_COUNT, function() use ($node) {
+ $propFind->handle(self::PROPERTY_NAME_COUNT, function () use ($node) {
return $this->commentsManager->getNumberOfCommentsForObject('files', (string)$node->getId());
});
- $propFind->handle(self::PROPERTY_NAME_HREF, function() use ($node) {
+ $propFind->handle(self::PROPERTY_NAME_HREF, function () use ($node) {
return $this->getCommentsLink($node);
});
- $propFind->handle(self::PROPERTY_NAME_UNREAD, function() use ($node) {
+ $propFind->handle(self::PROPERTY_NAME_UNREAD, function () use ($node) {
if (isset($this->cachedUnreadCount[$node->getId()])) {
return $this->cachedUnreadCount[$node->getId()];
} else {
diff --git a/apps/dav/lib/Connector/Sabre/FakeLockerPlugin.php b/apps/dav/lib/Connector/Sabre/FakeLockerPlugin.php
index 7f1a735c7a4..62c9915cc4e 100644
--- a/apps/dav/lib/Connector/Sabre/FakeLockerPlugin.php
+++ b/apps/dav/lib/Connector/Sabre/FakeLockerPlugin.php
@@ -89,10 +89,10 @@ class FakeLockerPlugin extends ServerPlugin {
* @return void
*/
function propFind(PropFind $propFind, INode $node) {
- $propFind->handle('{DAV:}supportedlock', function() {
+ $propFind->handle('{DAV:}supportedlock', function () {
return new SupportedLock(true);
});
- $propFind->handle('{DAV:}lockdiscovery', function() use ($propFind) {
+ $propFind->handle('{DAV:}lockdiscovery', function () use ($propFind) {
return new LockDiscovery([]);
});
}
diff --git a/apps/dav/lib/Connector/Sabre/FilesPlugin.php b/apps/dav/lib/Connector/Sabre/FilesPlugin.php
index 8f94ea9a52e..890e65a7fa5 100644
--- a/apps/dav/lib/Connector/Sabre/FilesPlugin.php
+++ b/apps/dav/lib/Connector/Sabre/FilesPlugin.php
@@ -180,7 +180,7 @@ class FilesPlugin extends ServerPlugin {
$this->server->on('afterWriteContent', [$this, 'sendFileIdHeader']);
$this->server->on('afterMethod:GET', [$this,'httpGet']);
$this->server->on('afterMethod:GET', [$this, 'handleDownloadToken']);
- $this->server->on('afterResponse', function($request, ResponseInterface $response) {
+ $this->server->on('afterResponse', function ($request, ResponseInterface $response) {
$body = $response->getBody();
if (is_resource($body)) {
fclose($body);
@@ -305,15 +305,15 @@ class FilesPlugin extends ServerPlugin {
* }
*/
- $propFind->handle(self::FILEID_PROPERTYNAME, function() use ($node) {
+ $propFind->handle(self::FILEID_PROPERTYNAME, function () use ($node) {
return $node->getFileId();
});
- $propFind->handle(self::INTERNAL_FILEID_PROPERTYNAME, function() use ($node) {
+ $propFind->handle(self::INTERNAL_FILEID_PROPERTYNAME, function () use ($node) {
return $node->getInternalFileId();
});
- $propFind->handle(self::PERMISSIONS_PROPERTYNAME, function() use ($node) {
+ $propFind->handle(self::PERMISSIONS_PROPERTYNAME, function () use ($node) {
$perms = $node->getDavPermissions();
if ($this->isPublic) {
// remove mount information
@@ -322,13 +322,13 @@ class FilesPlugin extends ServerPlugin {
return $perms;
});
- $propFind->handle(self::SHARE_PERMISSIONS_PROPERTYNAME, function() use ($node, $httpRequest) {
+ $propFind->handle(self::SHARE_PERMISSIONS_PROPERTYNAME, function () use ($node, $httpRequest) {
return $node->getSharePermissions(
$httpRequest->getRawServerValue('PHP_AUTH_USER')
);
});
- $propFind->handle(self::OCM_SHARE_PERMISSIONS_PROPERTYNAME, function() use ($node, $httpRequest) {
+ $propFind->handle(self::OCM_SHARE_PERMISSIONS_PROPERTYNAME, function () use ($node, $httpRequest) {
$ncPermissions = $node->getSharePermissions(
$httpRequest->getRawServerValue('PHP_AUTH_USER')
);
@@ -336,11 +336,11 @@ class FilesPlugin extends ServerPlugin {
return json_encode($ocmPermissions);
});
- $propFind->handle(self::GETETAG_PROPERTYNAME, function() use ($node) {
+ $propFind->handle(self::GETETAG_PROPERTYNAME, function () use ($node) {
return $node->getETag();
});
- $propFind->handle(self::OWNER_ID_PROPERTYNAME, function() use ($node) {
+ $propFind->handle(self::OWNER_ID_PROPERTYNAME, function () use ($node) {
$owner = $node->getOwner();
if (!$owner) {
return null;
@@ -348,7 +348,7 @@ class FilesPlugin extends ServerPlugin {
return $owner->getUID();
}
});
- $propFind->handle(self::OWNER_DISPLAY_NAME_PROPERTYNAME, function() use ($node) {
+ $propFind->handle(self::OWNER_DISPLAY_NAME_PROPERTYNAME, function () use ($node) {
$owner = $node->getOwner();
if (!$owner) {
return null;
@@ -360,14 +360,14 @@ class FilesPlugin extends ServerPlugin {
$propFind->handle(self::HAS_PREVIEW_PROPERTYNAME, function () use ($node) {
return json_encode($this->previewManager->isAvailable($node->getFileInfo()));
});
- $propFind->handle(self::SIZE_PROPERTYNAME, function() use ($node) {
+ $propFind->handle(self::SIZE_PROPERTYNAME, function () use ($node) {
return $node->getSize();
});
$propFind->handle(self::MOUNT_TYPE_PROPERTYNAME, function () use ($node) {
return $node->getFileInfo()->getMountPoint()->getMountType();
});
- $propFind->handle(self::SHARE_NOTE, function() use ($node, $httpRequest) {
+ $propFind->handle(self::SHARE_NOTE, function () use ($node, $httpRequest) {
return $node->getNoteFromShare(
$httpRequest->getRawServerValue('PHP_AUTH_USER')
);
@@ -375,13 +375,13 @@ class FilesPlugin extends ServerPlugin {
}
if ($node instanceof \OCA\DAV\Connector\Sabre\Node) {
- $propFind->handle(self::DATA_FINGERPRINT_PROPERTYNAME, function() use ($node) {
+ $propFind->handle(self::DATA_FINGERPRINT_PROPERTYNAME, function () use ($node) {
return $this->config->getSystemValue('data-fingerprint', '');
});
}
if ($node instanceof \OCA\DAV\Connector\Sabre\File) {
- $propFind->handle(self::DOWNLOADURL_PROPERTYNAME, function() use ($node) {
+ $propFind->handle(self::DOWNLOADURL_PROPERTYNAME, function () use ($node) {
/** @var $node \OCA\DAV\Connector\Sabre\File */
try {
$directDownloadUrl = $node->getDirectDownload();
@@ -396,7 +396,7 @@ class FilesPlugin extends ServerPlugin {
return false;
});
- $propFind->handle(self::CHECKSUMS_PROPERTYNAME, function() use ($node) {
+ $propFind->handle(self::CHECKSUMS_PROPERTYNAME, function () use ($node) {
$checksum = $node->getChecksum();
if ($checksum === null || $checksum === '') {
return null;
@@ -405,22 +405,22 @@ class FilesPlugin extends ServerPlugin {
return new ChecksumList($checksum);
});
- $propFind->handle(self::CREATION_TIME_PROPERTYNAME, function() use ($node) {
+ $propFind->handle(self::CREATION_TIME_PROPERTYNAME, function () use ($node) {
return $node->getFileInfo()->getCreationTime();
});
- $propFind->handle(self::UPLOAD_TIME_PROPERTYNAME, function() use ($node) {
+ $propFind->handle(self::UPLOAD_TIME_PROPERTYNAME, function () use ($node) {
return $node->getFileInfo()->getUploadTime();
});
}
if ($node instanceof \OCA\DAV\Connector\Sabre\Directory) {
- $propFind->handle(self::SIZE_PROPERTYNAME, function() use ($node) {
+ $propFind->handle(self::SIZE_PROPERTYNAME, function () use ($node) {
return $node->getSize();
});
- $propFind->handle(self::IS_ENCRYPTED_PROPERTYNAME, function() use ($node) {
+ $propFind->handle(self::IS_ENCRYPTED_PROPERTYNAME, function () use ($node) {
return $node->getFileInfo()->isEncrypted() ? '1' : '0';
});
}
@@ -467,14 +467,14 @@ class FilesPlugin extends ServerPlugin {
return;
}
- $propPatch->handle(self::LASTMODIFIED_PROPERTYNAME, function($time) use ($node) {
+ $propPatch->handle(self::LASTMODIFIED_PROPERTYNAME, function ($time) use ($node) {
if (empty($time)) {
return false;
}
$node->touch($time);
return true;
});
- $propPatch->handle(self::GETETAG_PROPERTYNAME, function($etag) use ($node) {
+ $propPatch->handle(self::GETETAG_PROPERTYNAME, function ($etag) use ($node) {
if (empty($etag)) {
return false;
}
@@ -483,7 +483,7 @@ class FilesPlugin extends ServerPlugin {
}
return false;
});
- $propPatch->handle(self::CREATION_TIME_PROPERTYNAME, function($time) use ($node) {
+ $propPatch->handle(self::CREATION_TIME_PROPERTYNAME, function ($time) use ($node) {
if (empty($time)) {
return false;
}
diff --git a/apps/dav/lib/Connector/Sabre/Principal.php b/apps/dav/lib/Connector/Sabre/Principal.php
index 2fa01c0315d..73ebabdc48f 100644
--- a/apps/dav/lib/Connector/Sabre/Principal.php
+++ b/apps/dav/lib/Connector/Sabre/Principal.php
@@ -273,7 +273,7 @@ class Principal implements BackendInterface {
$users = $this->userManager->getByEmail($value);
if (!$allowEnumeration) {
- $users = \array_filter($users, static function(IUser $user) use ($value) {
+ $users = \array_filter($users, static function (IUser $user) use ($value) {
return $user->getEMailAddress() === $value;
});
}
@@ -287,7 +287,7 @@ class Principal implements BackendInterface {
});
}
- $results[] = array_reduce($users, function(array $carry, IUser $user) use ($restrictGroups) {
+ $results[] = array_reduce($users, function (array $carry, IUser $user) use ($restrictGroups) {
// is sharing restricted to groups only?
if ($restrictGroups !== false) {
$userGroups = $this->groupManager->getUserGroupIds($user);
@@ -305,7 +305,7 @@ class Principal implements BackendInterface {
$users = $this->userManager->searchDisplayName($value);
if (!$allowEnumeration) {
- $users = \array_filter($users, static function(IUser $user) use ($value) {
+ $users = \array_filter($users, static function (IUser $user) use ($value) {
return $user->getDisplayName() === $value;
});
}
@@ -319,7 +319,7 @@ class Principal implements BackendInterface {
});
}
- $results[] = array_reduce($users, function(array $carry, IUser $user) use ($restrictGroups) {
+ $results[] = array_reduce($users, function (array $carry, IUser $user) use ($restrictGroups) {
// is sharing restricted to groups only?
if ($restrictGroups !== false) {
$userGroups = $this->groupManager->getUserGroupIds($user);
@@ -518,7 +518,7 @@ class Principal implements BackendInterface {
$circles = \OCA\Circles\Api\v1\Circles::joinedCircles($name, true);
- $circles = array_map(function($circle) {
+ $circles = array_map(function ($circle) {
/** @var \OCA\Circles\Model\Circle $circle */
return 'principals/circles/' . urlencode($circle->getUniqueId());
}, $circles);
diff --git a/apps/dav/lib/Connector/Sabre/SharesPlugin.php b/apps/dav/lib/Connector/Sabre/SharesPlugin.php
index 8b811226734..ef1e7236c9b 100644
--- a/apps/dav/lib/Connector/Sabre/SharesPlugin.php
+++ b/apps/dav/lib/Connector/Sabre/SharesPlugin.php
@@ -200,14 +200,14 @@ class SharesPlugin extends \Sabre\DAV\ServerPlugin {
$propFind->handle(self::SHARETYPES_PROPERTYNAME, function () use ($sabreNode) {
$shares = $this->getShares($sabreNode);
- $shareTypes = array_unique(array_map(function(IShare $share) {
+ $shareTypes = array_unique(array_map(function (IShare $share) {
return $share->getShareType();
}, $shares));
return new ShareTypeList($shareTypes);
});
- $propFind->handle(self::SHAREES_PROPERTYNAME, function() use ($sabreNode) {
+ $propFind->handle(self::SHAREES_PROPERTYNAME, function () use ($sabreNode) {
$shares = $this->getShares($sabreNode);
return new ShareeList($shares);
diff --git a/apps/dav/lib/Connector/Sabre/TagsPlugin.php b/apps/dav/lib/Connector/Sabre/TagsPlugin.php
index 9cefe682de9..83995a31e57 100644
--- a/apps/dav/lib/Connector/Sabre/TagsPlugin.php
+++ b/apps/dav/lib/Connector/Sabre/TagsPlugin.php
@@ -246,12 +246,12 @@ class TagsPlugin extends \Sabre\DAV\ServerPlugin
$isFav = null;
- $propFind->handle(self::TAGS_PROPERTYNAME, function() use (&$isFav, $node) {
+ $propFind->handle(self::TAGS_PROPERTYNAME, function () use (&$isFav, $node) {
list($tags, $isFav) = $this->getTagsAndFav($node->getId());
return new TagList($tags);
});
- $propFind->handle(self::FAVORITE_PROPERTYNAME, function() use ($isFav, $node) {
+ $propFind->handle(self::FAVORITE_PROPERTYNAME, function () use ($isFav, $node) {
if (is_null($isFav)) {
list(, $isFav) = $this->getTagsAndFav($node->getId());
}
@@ -277,12 +277,12 @@ class TagsPlugin extends \Sabre\DAV\ServerPlugin
return;
}
- $propPatch->handle(self::TAGS_PROPERTYNAME, function($tagList) use ($node) {
+ $propPatch->handle(self::TAGS_PROPERTYNAME, function ($tagList) use ($node) {
$this->updateTags($node->getId(), $tagList->getTags());
return true;
});
- $propPatch->handle(self::FAVORITE_PROPERTYNAME, function($favState) use ($node) {
+ $propPatch->handle(self::FAVORITE_PROPERTYNAME, function ($favState) use ($node) {
if ((int)$favState === 1 || $favState === 'true') {
$this->getTagger()->tagAs($node->getId(), self::TAG_FAVORITE);
} else {