aboutsummaryrefslogtreecommitdiffstats
path: root/apps/dav/lib/Connector/Sabre/FilesPlugin.php
diff options
context:
space:
mode:
authorChristoph Wurst <christoph@winzerhof-wurst.at>2020-04-09 13:53:40 +0200
committerChristoph Wurst <christoph@winzerhof-wurst.at>2020-04-09 13:54:22 +0200
commitafbd9c4e6ed834e713039f2cff88ba3eec03dadb (patch)
tree7d8721cf8fc0329d6b750db63798de67a162b090 /apps/dav/lib/Connector/Sabre/FilesPlugin.php
parent19e97e86c69ab128191439d6a17dacb5a630cf98 (diff)
downloadnextcloud-server-afbd9c4e6ed834e713039f2cff88ba3eec03dadb.tar.gz
nextcloud-server-afbd9c4e6ed834e713039f2cff88ba3eec03dadb.zip
Unify function spacing to PSR2 recommendation
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'apps/dav/lib/Connector/Sabre/FilesPlugin.php')
-rw-r--r--apps/dav/lib/Connector/Sabre/FilesPlugin.php42
1 files changed, 21 insertions, 21 deletions
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;
}