summaryrefslogtreecommitdiffstats
path: root/apps/dav/lib/Connector/Sabre
diff options
context:
space:
mode:
Diffstat (limited to 'apps/dav/lib/Connector/Sabre')
-rw-r--r--apps/dav/lib/Connector/Sabre/AppEnabledPlugin.php2
-rw-r--r--apps/dav/lib/Connector/Sabre/CommentPropertiesPlugin.php2
-rw-r--r--apps/dav/lib/Connector/Sabre/Directory.php8
-rw-r--r--apps/dav/lib/Connector/Sabre/ExceptionLoggerPlugin.php2
-rw-r--r--apps/dav/lib/Connector/Sabre/File.php24
-rw-r--r--apps/dav/lib/Connector/Sabre/FilesPlugin.php10
-rw-r--r--apps/dav/lib/Connector/Sabre/FilesReportPlugin.php2
-rw-r--r--apps/dav/lib/Connector/Sabre/MaintenancePlugin.php2
-rw-r--r--apps/dav/lib/Connector/Sabre/Node.php6
-rw-r--r--apps/dav/lib/Connector/Sabre/SharesPlugin.php2
-rw-r--r--apps/dav/lib/Connector/Sabre/TagsPlugin.php14
11 files changed, 37 insertions, 37 deletions
diff --git a/apps/dav/lib/Connector/Sabre/AppEnabledPlugin.php b/apps/dav/lib/Connector/Sabre/AppEnabledPlugin.php
index 139044f9535..947b2960eab 100644
--- a/apps/dav/lib/Connector/Sabre/AppEnabledPlugin.php
+++ b/apps/dav/lib/Connector/Sabre/AppEnabledPlugin.php
@@ -74,7 +74,7 @@ class AppEnabledPlugin extends ServerPlugin {
public function initialize(\Sabre\DAV\Server $server) {
$this->server = $server;
- $this->server->on('beforeMethod', array($this, 'checkAppEnabled'), 30);
+ $this->server->on('beforeMethod', [$this, 'checkAppEnabled'], 30);
}
/**
diff --git a/apps/dav/lib/Connector/Sabre/CommentPropertiesPlugin.php b/apps/dav/lib/Connector/Sabre/CommentPropertiesPlugin.php
index 1a069e548b4..22f0104940d 100644
--- a/apps/dav/lib/Connector/Sabre/CommentPropertiesPlugin.php
+++ b/apps/dav/lib/Connector/Sabre/CommentPropertiesPlugin.php
@@ -67,7 +67,7 @@ class CommentPropertiesPlugin extends ServerPlugin {
*/
function initialize(\Sabre\DAV\Server $server) {
$this->server = $server;
- $this->server->on('propFind', array($this, 'handleGetProperties'));
+ $this->server->on('propFind', [$this, 'handleGetProperties']);
}
/**
diff --git a/apps/dav/lib/Connector/Sabre/Directory.php b/apps/dav/lib/Connector/Sabre/Directory.php
index d17cfb81777..9b44997fb60 100644
--- a/apps/dav/lib/Connector/Sabre/Directory.php
+++ b/apps/dav/lib/Connector/Sabre/Directory.php
@@ -267,7 +267,7 @@ class Directory extends \OCA\DAV\Connector\Sabre\Node
throw new Locked();
}
- $nodes = array();
+ $nodes = [];
foreach ($folderContent as $info) {
$node = $this->getChild($info->getName(), $info);
$nodes[] = $node;
@@ -336,13 +336,13 @@ class Directory extends \OCA\DAV\Connector\Sabre\Node
} else {
$free = $storageInfo['free'];
}
- $this->quotaInfo = array(
+ $this->quotaInfo = [
$storageInfo['used'],
$free
- );
+ ];
return $this->quotaInfo;
} catch (\OCP\Files\StorageNotAvailableException $e) {
- return array(0, 0);
+ return [0, 0];
}
}
diff --git a/apps/dav/lib/Connector/Sabre/ExceptionLoggerPlugin.php b/apps/dav/lib/Connector/Sabre/ExceptionLoggerPlugin.php
index dc595197965..cf617152eb8 100644
--- a/apps/dav/lib/Connector/Sabre/ExceptionLoggerPlugin.php
+++ b/apps/dav/lib/Connector/Sabre/ExceptionLoggerPlugin.php
@@ -103,7 +103,7 @@ class ExceptionLoggerPlugin extends \Sabre\DAV\ServerPlugin {
*/
public function initialize(\Sabre\DAV\Server $server) {
- $server->on('exception', array($this, 'logException'), 10);
+ $server->on('exception', [$this, 'logException'], 10);
}
/**
diff --git a/apps/dav/lib/Connector/Sabre/File.php b/apps/dav/lib/Connector/Sabre/File.php
index 098961ce130..0bd01de408b 100644
--- a/apps/dav/lib/Connector/Sabre/File.php
+++ b/apps/dav/lib/Connector/Sabre/File.php
@@ -359,20 +359,20 @@ class File extends Node implements IFile {
$run = true;
if (!$exists) {
- \OC_Hook::emit(\OC\Files\Filesystem::CLASSNAME, \OC\Files\Filesystem::signal_create, array(
+ \OC_Hook::emit(\OC\Files\Filesystem::CLASSNAME, \OC\Files\Filesystem::signal_create, [
\OC\Files\Filesystem::signal_param_path => $hookPath,
\OC\Files\Filesystem::signal_param_run => &$run,
- ));
+ ]);
} else {
- \OC_Hook::emit(\OC\Files\Filesystem::CLASSNAME, \OC\Files\Filesystem::signal_update, array(
+ \OC_Hook::emit(\OC\Files\Filesystem::CLASSNAME, \OC\Files\Filesystem::signal_update, [
\OC\Files\Filesystem::signal_param_path => $hookPath,
\OC\Files\Filesystem::signal_param_run => &$run,
- ));
+ ]);
}
- \OC_Hook::emit(\OC\Files\Filesystem::CLASSNAME, \OC\Files\Filesystem::signal_write, array(
+ \OC_Hook::emit(\OC\Files\Filesystem::CLASSNAME, \OC\Files\Filesystem::signal_write, [
\OC\Files\Filesystem::signal_param_path => $hookPath,
\OC\Files\Filesystem::signal_param_run => &$run,
- ));
+ ]);
return $run;
}
@@ -385,17 +385,17 @@ class File extends Node implements IFile {
}
$hookPath = Filesystem::getView()->getRelativePath($this->fileView->getAbsolutePath($path));
if (!$exists) {
- \OC_Hook::emit(\OC\Files\Filesystem::CLASSNAME, \OC\Files\Filesystem::signal_post_create, array(
+ \OC_Hook::emit(\OC\Files\Filesystem::CLASSNAME, \OC\Files\Filesystem::signal_post_create, [
\OC\Files\Filesystem::signal_param_path => $hookPath
- ));
+ ]);
} else {
- \OC_Hook::emit(\OC\Files\Filesystem::CLASSNAME, \OC\Files\Filesystem::signal_post_update, array(
+ \OC_Hook::emit(\OC\Files\Filesystem::CLASSNAME, \OC\Files\Filesystem::signal_post_update, [
\OC\Files\Filesystem::signal_param_path => $hookPath
- ));
+ ]);
}
- \OC_Hook::emit(\OC\Files\Filesystem::CLASSNAME, \OC\Files\Filesystem::signal_post_write, array(
+ \OC_Hook::emit(\OC\Files\Filesystem::CLASSNAME, \OC\Files\Filesystem::signal_post_write, [
\OC\Files\Filesystem::signal_param_path => $hookPath
- ));
+ ]);
}
/**
diff --git a/apps/dav/lib/Connector/Sabre/FilesPlugin.php b/apps/dav/lib/Connector/Sabre/FilesPlugin.php
index 498058f7c03..a35db1e77e4 100644
--- a/apps/dav/lib/Connector/Sabre/FilesPlugin.php
+++ b/apps/dav/lib/Connector/Sabre/FilesPlugin.php
@@ -173,12 +173,12 @@ class FilesPlugin extends ServerPlugin {
$server->protectedProperties = array_diff($server->protectedProperties, $allowedProperties);
$this->server = $server;
- $this->server->on('propFind', array($this, 'handleGetProperties'));
- $this->server->on('propPatch', array($this, 'handleUpdateProperties'));
- $this->server->on('afterBind', array($this, 'sendFileIdHeader'));
- $this->server->on('afterWriteContent', array($this, 'sendFileIdHeader'));
+ $this->server->on('propFind', [$this, 'handleGetProperties']);
+ $this->server->on('propPatch', [$this, 'handleUpdateProperties']);
+ $this->server->on('afterBind', [$this, 'sendFileIdHeader']);
+ $this->server->on('afterWriteContent', [$this, 'sendFileIdHeader']);
$this->server->on('afterMethod:GET', [$this,'httpGet']);
- $this->server->on('afterMethod:GET', array($this, 'handleDownloadToken'));
+ $this->server->on('afterMethod:GET', [$this, 'handleDownloadToken']);
$this->server->on('afterResponse', function($request, ResponseInterface $response) {
$body = $response->getBody();
if (is_resource($body)) {
diff --git a/apps/dav/lib/Connector/Sabre/FilesReportPlugin.php b/apps/dav/lib/Connector/Sabre/FilesReportPlugin.php
index 41de6ea4ed8..a2de82fa9c5 100644
--- a/apps/dav/lib/Connector/Sabre/FilesReportPlugin.php
+++ b/apps/dav/lib/Connector/Sabre/FilesReportPlugin.php
@@ -154,7 +154,7 @@ class FilesReportPlugin extends ServerPlugin {
$server->xml->namespaceMap[self::NS_OWNCLOUD] = 'oc';
$this->server = $server;
- $this->server->on('report', array($this, 'onReport'));
+ $this->server->on('report', [$this, 'onReport']);
}
/**
diff --git a/apps/dav/lib/Connector/Sabre/MaintenancePlugin.php b/apps/dav/lib/Connector/Sabre/MaintenancePlugin.php
index d015bcbc21c..4076abe59fe 100644
--- a/apps/dav/lib/Connector/Sabre/MaintenancePlugin.php
+++ b/apps/dav/lib/Connector/Sabre/MaintenancePlugin.php
@@ -67,7 +67,7 @@ class MaintenancePlugin extends ServerPlugin {
*/
public function initialize(\Sabre\DAV\Server $server) {
$this->server = $server;
- $this->server->on('beforeMethod', array($this, 'checkMaintenanceMode'), 1);
+ $this->server->on('beforeMethod', [$this, 'checkMaintenanceMode'], 1);
}
/**
diff --git a/apps/dav/lib/Connector/Sabre/Node.php b/apps/dav/lib/Connector/Sabre/Node.php
index f178b2fbfbd..5f9ecf88142 100644
--- a/apps/dav/lib/Connector/Sabre/Node.php
+++ b/apps/dav/lib/Connector/Sabre/Node.php
@@ -200,15 +200,15 @@ abstract class Node implements \Sabre\DAV\INode {
* @return int file id of updated file or -1 on failure
*/
public function setETag($etag) {
- return $this->fileView->putFileInfo($this->path, array('etag' => $etag));
+ return $this->fileView->putFileInfo($this->path, ['etag' => $etag]);
}
public function setCreationTime(int $time) {
- return $this->fileView->putFileInfo($this->path, array('creation_time' => $time));
+ return $this->fileView->putFileInfo($this->path, ['creation_time' => $time]);
}
public function setUploadTime(int $time) {
- return $this->fileView->putFileInfo($this->path, array('upload_time' => $time));
+ return $this->fileView->putFileInfo($this->path, ['upload_time' => $time]);
}
/**
diff --git a/apps/dav/lib/Connector/Sabre/SharesPlugin.php b/apps/dav/lib/Connector/Sabre/SharesPlugin.php
index a4baa65948e..9d543e55a4b 100644
--- a/apps/dav/lib/Connector/Sabre/SharesPlugin.php
+++ b/apps/dav/lib/Connector/Sabre/SharesPlugin.php
@@ -107,7 +107,7 @@ class SharesPlugin extends \Sabre\DAV\ServerPlugin {
$server->protectedProperties[] = self::SHAREES_PROPERTYNAME;
$this->server = $server;
- $this->server->on('propFind', array($this, 'handleGetProperties'));
+ $this->server->on('propFind', [$this, 'handleGetProperties']);
}
private function getShare(\OCP\Files\Node $node): array {
diff --git a/apps/dav/lib/Connector/Sabre/TagsPlugin.php b/apps/dav/lib/Connector/Sabre/TagsPlugin.php
index fe19b434648..2ac7c01f426 100644
--- a/apps/dav/lib/Connector/Sabre/TagsPlugin.php
+++ b/apps/dav/lib/Connector/Sabre/TagsPlugin.php
@@ -98,7 +98,7 @@ class TagsPlugin extends \Sabre\DAV\ServerPlugin
$this->tree = $tree;
$this->tagManager = $tagManager;
$this->tagger = null;
- $this->cachedTags = array();
+ $this->cachedTags = [];
}
/**
@@ -118,8 +118,8 @@ class TagsPlugin extends \Sabre\DAV\ServerPlugin
$server->xml->elementMap[self::TAGS_PROPERTYNAME] = TagList::class;
$this->server = $server;
- $this->server->on('propFind', array($this, 'handleGetProperties'));
- $this->server->on('propPatch', array($this, 'handleUpdateProperties'));
+ $this->server->on('propFind', [$this, 'handleGetProperties']);
+ $this->server->on('propPatch', [$this, 'handleUpdateProperties']);
}
/**
@@ -151,7 +151,7 @@ class TagsPlugin extends \Sabre\DAV\ServerPlugin
unset($tags[$favPos]);
}
}
- return array($tags, $isFav);
+ return [$tags, $isFav];
}
/**
@@ -164,10 +164,10 @@ class TagsPlugin extends \Sabre\DAV\ServerPlugin
if (isset($this->cachedTags[$fileId])) {
return $this->cachedTags[$fileId];
} else {
- $tags = $this->getTagger()->getTagsForObjects(array($fileId));
+ $tags = $this->getTagger()->getTagsForObjects([$fileId]);
if ($tags !== false) {
if (empty($tags)) {
- return array();
+ return [];
}
return current($tags);
}
@@ -232,7 +232,7 @@ class TagsPlugin extends \Sabre\DAV\ServerPlugin
$tags = $this->getTagger()->getTagsForObjects($fileIds);
if ($tags === false) {
// the tags API returns false on error...
- $tags = array();
+ $tags = [];
}
$this->cachedTags = $this->cachedTags + $tags;