aboutsummaryrefslogtreecommitdiffstats
path: root/apps/dav/lib/Upload
diff options
context:
space:
mode:
authorChristoph Wurst <christoph@winzerhof-wurst.at>2020-04-10 16:51:06 +0200
committerChristoph Wurst <christoph@winzerhof-wurst.at>2020-04-10 16:51:06 +0200
commit1584c9ae9c23d2a7915750ef9203cba0bcebf766 (patch)
tree568db931f631afd6e96772cf2b3ac539c989ec42 /apps/dav/lib/Upload
parenta7c8d26d31cb1cf69e0e060c53622e545fcfbbb3 (diff)
downloadnextcloud-server-1584c9ae9c23d2a7915750ef9203cba0bcebf766.tar.gz
nextcloud-server-1584c9ae9c23d2a7915750ef9203cba0bcebf766.zip
Add visibility to all methods and position of static keyword
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'apps/dav/lib/Upload')
-rw-r--r--apps/dav/lib/Upload/ChunkingPlugin.php4
-rw-r--r--apps/dav/lib/Upload/FutureFile.php20
-rw-r--r--apps/dav/lib/Upload/UploadFolder.php20
3 files changed, 22 insertions, 22 deletions
diff --git a/apps/dav/lib/Upload/ChunkingPlugin.php b/apps/dav/lib/Upload/ChunkingPlugin.php
index 704cbf8f578..35487f61429 100644
--- a/apps/dav/lib/Upload/ChunkingPlugin.php
+++ b/apps/dav/lib/Upload/ChunkingPlugin.php
@@ -37,7 +37,7 @@ class ChunkingPlugin extends ServerPlugin {
/**
* @inheritdoc
*/
- function initialize(Server $server) {
+ public function initialize(Server $server) {
$server->on('beforeMove', [$this, 'beforeMove']);
$this->server = $server;
}
@@ -46,7 +46,7 @@ class ChunkingPlugin extends ServerPlugin {
* @param string $sourcePath source path
* @param string $destination destination path
*/
- function beforeMove($sourcePath, $destination) {
+ public function beforeMove($sourcePath, $destination) {
$this->sourceNode = $this->server->tree->getNodeForPath($sourcePath);
if (!$this->sourceNode instanceof FutureFile) {
// skip handling as the source is not a chunked FutureFile
diff --git a/apps/dav/lib/Upload/FutureFile.php b/apps/dav/lib/Upload/FutureFile.php
index 34a5981bda2..335696f0e30 100644
--- a/apps/dav/lib/Upload/FutureFile.php
+++ b/apps/dav/lib/Upload/FutureFile.php
@@ -47,7 +47,7 @@ class FutureFile implements \Sabre\DAV\IFile {
* @param Directory $root
* @param string $name
*/
- function __construct(Directory $root, $name) {
+ public function __construct(Directory $root, $name) {
$this->root = $root;
$this->name = $name;
}
@@ -55,14 +55,14 @@ class FutureFile implements \Sabre\DAV\IFile {
/**
* @inheritdoc
*/
- function put($data) {
+ public function put($data) {
throw new Forbidden('Permission denied to put into this file');
}
/**
* @inheritdoc
*/
- function get() {
+ public function get() {
$nodes = $this->root->getChildren();
return AssemblyStream::wrap($nodes);
}
@@ -70,21 +70,21 @@ class FutureFile implements \Sabre\DAV\IFile {
/**
* @inheritdoc
*/
- function getContentType() {
+ public function getContentType() {
return 'application/octet-stream';
}
/**
* @inheritdoc
*/
- function getETag() {
+ public function getETag() {
return $this->root->getETag();
}
/**
* @inheritdoc
*/
- function getSize() {
+ public function getSize() {
$children = $this->root->getChildren();
$sizes = array_map(function ($node) {
/** @var IFile $node */
@@ -97,28 +97,28 @@ class FutureFile implements \Sabre\DAV\IFile {
/**
* @inheritdoc
*/
- function delete() {
+ public function delete() {
$this->root->delete();
}
/**
* @inheritdoc
*/
- function getName() {
+ public function getName() {
return $this->name;
}
/**
* @inheritdoc
*/
- function setName($name) {
+ public function setName($name) {
throw new Forbidden('Permission denied to rename this file');
}
/**
* @inheritdoc
*/
- function getLastModified() {
+ public function getLastModified() {
return $this->root->getLastModified();
}
}
diff --git a/apps/dav/lib/Upload/UploadFolder.php b/apps/dav/lib/Upload/UploadFolder.php
index 6778a30b8a2..d74154c6ac9 100644
--- a/apps/dav/lib/Upload/UploadFolder.php
+++ b/apps/dav/lib/Upload/UploadFolder.php
@@ -35,56 +35,56 @@ class UploadFolder implements ICollection {
/** @var CleanupService */
private $cleanupService;
- function __construct(Directory $node, CleanupService $cleanupService) {
+ public function __construct(Directory $node, CleanupService $cleanupService) {
$this->node = $node;
$this->cleanupService = $cleanupService;
}
- function createFile($name, $data = null) {
+ public function createFile($name, $data = null) {
// TODO: verify name - should be a simple number
$this->node->createFile($name, $data);
}
- function createDirectory($name) {
+ public function createDirectory($name) {
throw new Forbidden('Permission denied to create file (filename ' . $name . ')');
}
- function getChild($name) {
+ public function getChild($name) {
if ($name === '.file') {
return new FutureFile($this->node, '.file');
}
return $this->node->getChild($name);
}
- function getChildren() {
+ public function getChildren() {
$children = $this->node->getChildren();
$children[] = new FutureFile($this->node, '.file');
return $children;
}
- function childExists($name) {
+ public function childExists($name) {
if ($name === '.file') {
return true;
}
return $this->node->childExists($name);
}
- function delete() {
+ public function delete() {
$this->node->delete();
// Background cleanup job is not needed anymore
$this->cleanupService->removeJob($this->getName());
}
- function getName() {
+ public function getName() {
return $this->node->getName();
}
- function setName($name) {
+ public function setName($name) {
throw new Forbidden('Permission denied to rename this folder');
}
- function getLastModified() {
+ public function getLastModified() {
return $this->node->getLastModified();
}
}