diff options
Diffstat (limited to 'apps/dav/lib/Comments')
-rw-r--r-- | apps/dav/lib/Comments/CommentNode.php | 14 | ||||
-rw-r--r-- | apps/dav/lib/Comments/CommentsPlugin.php | 2 | ||||
-rw-r--r-- | apps/dav/lib/Comments/EntityCollection.php | 12 | ||||
-rw-r--r-- | apps/dav/lib/Comments/EntityTypeCollection.php | 6 | ||||
-rw-r--r-- | apps/dav/lib/Comments/RootCollection.php | 18 |
5 files changed, 26 insertions, 26 deletions
diff --git a/apps/dav/lib/Comments/CommentNode.php b/apps/dav/lib/Comments/CommentNode.php index e02eef1cd51..d21f13ebccd 100644 --- a/apps/dav/lib/Comments/CommentNode.php +++ b/apps/dav/lib/Comments/CommentNode.php @@ -104,7 +104,7 @@ class CommentNode implements \Sabre\DAV\INode, \Sabre\DAV\IProperties { * * @return array */ - static public function getPropertyNames() { + public static function getPropertyNames() { return [ '{http://owncloud.org/ns}id', '{http://owncloud.org/ns}parentId', @@ -144,7 +144,7 @@ class CommentNode implements \Sabre\DAV\INode, \Sabre\DAV\IProperties { * * @return void */ - function delete() { + public function delete() { $this->checkWriteAccessOnComment(); $this->commentsManager->delete($this->comment->getId()); } @@ -156,7 +156,7 @@ class CommentNode implements \Sabre\DAV\INode, \Sabre\DAV\IProperties { * * @return string */ - function getName() { + public function getName() { return $this->comment->getId(); } @@ -166,7 +166,7 @@ class CommentNode implements \Sabre\DAV\INode, \Sabre\DAV\IProperties { * @param string $name The new name * @throws MethodNotAllowed */ - function setName($name) { + public function setName($name) { throw new MethodNotAllowed(); } @@ -175,7 +175,7 @@ class CommentNode implements \Sabre\DAV\INode, \Sabre\DAV\IProperties { * * @return int */ - function getLastModified() { + public function getLastModified() { return null; } @@ -215,7 +215,7 @@ class CommentNode implements \Sabre\DAV\INode, \Sabre\DAV\IProperties { * @param PropPatch $propPatch * @return void */ - function propPatch(PropPatch $propPatch) { + public function propPatch(PropPatch $propPatch) { // other properties than 'message' are read only $propPatch->handle(self::PROPERTY_NAME_MESSAGE, [$this, 'updateComment']); } @@ -235,7 +235,7 @@ class CommentNode implements \Sabre\DAV\INode, \Sabre\DAV\IProperties { * @param array $properties * @return array */ - function getProperties($properties) { + public function getProperties($properties) { $properties = array_keys($this->properties); $result = []; diff --git a/apps/dav/lib/Comments/CommentsPlugin.php b/apps/dav/lib/Comments/CommentsPlugin.php index ebdf3fde318..ecfb5e5cfab 100644 --- a/apps/dav/lib/Comments/CommentsPlugin.php +++ b/apps/dav/lib/Comments/CommentsPlugin.php @@ -83,7 +83,7 @@ class CommentsPlugin extends ServerPlugin { * @param Server $server * @return void */ - function initialize(Server $server) { + public function initialize(Server $server) { $this->server = $server; if (strpos($this->server->getRequestUri(), 'comments/') !== 0) { return; diff --git a/apps/dav/lib/Comments/EntityCollection.php b/apps/dav/lib/Comments/EntityCollection.php index 94ee3d2a250..d64c5c36423 100644 --- a/apps/dav/lib/Comments/EntityCollection.php +++ b/apps/dav/lib/Comments/EntityCollection.php @@ -98,7 +98,7 @@ class EntityCollection extends RootCollection implements IProperties { * @return \Sabre\DAV\INode * @throws NotFound */ - function getChild($name) { + public function getChild($name) { try { $comment = $this->commentsManager->get($name); return new CommentNode( @@ -118,7 +118,7 @@ class EntityCollection extends RootCollection implements IProperties { * * @return \Sabre\DAV\INode[] */ - function getChildren() { + public function getChildren() { return $this->findChildren(); } @@ -131,7 +131,7 @@ class EntityCollection extends RootCollection implements IProperties { * @param \DateTime|null $datetime * @return CommentNode[] */ - function findChildren($limit = 0, $offset = 0, \DateTime $datetime = null) { + public function findChildren($limit = 0, $offset = 0, \DateTime $datetime = null) { $comments = $this->commentsManager->getForObject($this->name, $this->id, $limit, $offset, $datetime); $result = []; foreach ($comments as $comment) { @@ -152,7 +152,7 @@ class EntityCollection extends RootCollection implements IProperties { * @param string $name * @return bool */ - function childExists($name) { + public function childExists($name) { try { $this->commentsManager->get($name); return true; @@ -177,14 +177,14 @@ class EntityCollection extends RootCollection implements IProperties { /** * @inheritdoc */ - function propPatch(PropPatch $propPatch) { + public function propPatch(PropPatch $propPatch) { $propPatch->handle(self::PROPERTY_NAME_READ_MARKER, [$this, 'setReadMarker']); } /** * @inheritdoc */ - function getProperties($properties) { + public function getProperties($properties) { $marker = null; $user = $this->userSession->getUser(); if (!is_null($user)) { diff --git a/apps/dav/lib/Comments/EntityTypeCollection.php b/apps/dav/lib/Comments/EntityTypeCollection.php index 275b41c87e0..59f7cf4748d 100644 --- a/apps/dav/lib/Comments/EntityTypeCollection.php +++ b/apps/dav/lib/Comments/EntityTypeCollection.php @@ -90,7 +90,7 @@ class EntityTypeCollection extends RootCollection { * @return \Sabre\DAV\INode * @throws NotFound */ - function getChild($name) { + public function getChild($name) { if (!$this->childExists($name)) { throw new NotFound('Entity does not exist or is not available'); } @@ -110,7 +110,7 @@ class EntityTypeCollection extends RootCollection { * @return \Sabre\DAV\INode[] * @throws MethodNotAllowed */ - function getChildren() { + public function getChildren() { throw new MethodNotAllowed('No permission to list folder contents'); } @@ -120,7 +120,7 @@ class EntityTypeCollection extends RootCollection { * @param string $name * @return bool */ - function childExists($name) { + public function childExists($name) { return call_user_func($this->childExistsFunction, $name); } } diff --git a/apps/dav/lib/Comments/RootCollection.php b/apps/dav/lib/Comments/RootCollection.php index b6703a13a11..560d0105de9 100644 --- a/apps/dav/lib/Comments/RootCollection.php +++ b/apps/dav/lib/Comments/RootCollection.php @@ -118,7 +118,7 @@ class RootCollection implements ICollection { * @return null|string * @throws Forbidden */ - function createFile($name, $data = null) { + public function createFile($name, $data = null) { throw new Forbidden('Cannot create comments by id'); } @@ -128,7 +128,7 @@ class RootCollection implements ICollection { * @param string $name * @throws Forbidden */ - function createDirectory($name) { + public function createDirectory($name) { throw new Forbidden('Permission denied to create collections'); } @@ -142,7 +142,7 @@ class RootCollection implements ICollection { * @return \Sabre\DAV\INode * @throws NotFound */ - function getChild($name) { + public function getChild($name) { $this->initCollections(); if (isset($this->entityTypeCollections[$name])) { return $this->entityTypeCollections[$name]; @@ -155,7 +155,7 @@ class RootCollection implements ICollection { * * @return \Sabre\DAV\INode[] */ - function getChildren() { + public function getChildren() { $this->initCollections(); return $this->entityTypeCollections; } @@ -166,7 +166,7 @@ class RootCollection implements ICollection { * @param string $name * @return bool */ - function childExists($name) { + public function childExists($name) { $this->initCollections(); return isset($this->entityTypeCollections[$name]); } @@ -176,7 +176,7 @@ class RootCollection implements ICollection { * * @throws Forbidden */ - function delete() { + public function delete() { throw new Forbidden('Permission denied to delete this collection'); } @@ -187,7 +187,7 @@ class RootCollection implements ICollection { * * @return string */ - function getName() { + public function getName() { return $this->name; } @@ -197,7 +197,7 @@ class RootCollection implements ICollection { * @param string $name The new name * @throws Forbidden */ - function setName($name) { + public function setName($name) { throw new Forbidden('Permission denied to rename this collection'); } @@ -206,7 +206,7 @@ class RootCollection implements ICollection { * * @return int */ - function getLastModified() { + public function getLastModified() { return null; } } |