aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2015-12-02 21:17:03 +0100
committerVincent Petry <pvince81@owncloud.com>2015-12-03 15:23:21 +0100
commit502e454a6902c51d6756d606061a1a9092946c8f (patch)
tree4b4028179cb196301dc06afe0b814a895aa11e0f
parentcc72c6a30dc12b49dec907cd2fcd01766dbda4c1 (diff)
downloadnextcloud-server-502e454a6902c51d6756d606061a1a9092946c8f.tar.gz
nextcloud-server-502e454a6902c51d6756d606061a1a9092946c8f.zip
Fix PHPDoc ...
-rw-r--r--apps/dav/lib/systemtag/systemtagmappingnode.php5
-rw-r--r--apps/dav/lib/systemtag/systemtagnode.php3
-rw-r--r--apps/dav/lib/systemtag/systemtagplugin.php18
-rw-r--r--apps/dav/lib/systemtag/systemtagsbyidcollection.php1
-rw-r--r--apps/dav/lib/systemtag/systemtagsobjectmappingcollection.php2
-rw-r--r--apps/dav/lib/systemtag/systemtagsobjecttypecollection.php4
-rw-r--r--apps/dav/lib/systemtag/systemtagsrelationscollection.php3
7 files changed, 20 insertions, 16 deletions
diff --git a/apps/dav/lib/systemtag/systemtagmappingnode.php b/apps/dav/lib/systemtag/systemtagmappingnode.php
index 97c1afc1401..03088d734d3 100644
--- a/apps/dav/lib/systemtag/systemtagmappingnode.php
+++ b/apps/dav/lib/systemtag/systemtagmappingnode.php
@@ -22,7 +22,6 @@
namespace OCA\DAV\SystemTag;
use Sabre\DAV\Exception\NotFound;
-use Sabre\DAV\Exception\MethodNotAllowed;
use OCP\SystemTag\ISystemTag;
use OCP\SystemTag\ISystemTagManager;
@@ -53,6 +52,10 @@ class SystemTagMappingNode extends SystemTagNode {
* Sets up the node, expects a full path name
*
* @param ISystemTag $tag system tag
+ * @param string $objectId
+ * @param string $objectType
+ * @param ISystemTagManager $tagManager
+ * @param ISystemTagObjectMapper $tagMapper
*/
public function __construct(
ISystemTag $tag,
diff --git a/apps/dav/lib/systemtag/systemtagnode.php b/apps/dav/lib/systemtag/systemtagnode.php
index e425595352e..b09a7737930 100644
--- a/apps/dav/lib/systemtag/systemtagnode.php
+++ b/apps/dav/lib/systemtag/systemtagnode.php
@@ -21,6 +21,7 @@
namespace OCA\DAV\SystemTag;
+use OCP\SystemTag\TagAlreadyExistsException;
use Sabre\DAV\Exception\NotFound;
use Sabre\DAV\Exception\MethodNotAllowed;
use Sabre\DAV\Exception\Conflict;
@@ -45,6 +46,7 @@ class SystemTagNode implements \Sabre\DAV\INode {
* Sets up the node, expects a full path name
*
* @param ISystemTag $tag system tag
+ * @param ISystemTagManager $tagManager
*/
public function __construct(ISystemTag $tag, ISystemTagManager $tagManager) {
$this->tag = $tag;
@@ -84,6 +86,7 @@ class SystemTagNode implements \Sabre\DAV\INode {
* @param string $name new tag name
* @param bool $userVisible user visible
* @param bool $userAssignable user assignable
+ * @throws Conflict
*/
public function update($name, $userVisible, $userAssignable) {
try {
diff --git a/apps/dav/lib/systemtag/systemtagplugin.php b/apps/dav/lib/systemtag/systemtagplugin.php
index c2136409649..d5591c28493 100644
--- a/apps/dav/lib/systemtag/systemtagplugin.php
+++ b/apps/dav/lib/systemtag/systemtagplugin.php
@@ -20,16 +20,18 @@
*/
namespace OCA\DAV\SystemTag;
+use Sabre\DAV\Exception\NotFound;
use Sabre\DAV\PropFind;
use Sabre\DAV\PropPatch;
use Sabre\DAV\Exception\BadRequest;
use Sabre\DAV\Exception\UnsupportedMediaType;
use Sabre\DAV\Exception\Conflict;
-use OCA\DAV\SystemTag\SystemTagNode;
use OCP\SystemTag\ISystemTag;
use OCP\SystemTag\ISystemTagManager;
use OCP\SystemTag\TagAlreadyExistsException;
+use Sabre\HTTP\RequestInterface;
+use Sabre\HTTP\ResponseInterface;
class SystemTagPlugin extends \Sabre\DAV\ServerPlugin {
@@ -72,7 +74,7 @@ class SystemTagPlugin extends \Sabre\DAV\ServerPlugin {
*/
public function initialize(\Sabre\DAV\Server $server) {
- $server->xmlNamespaces[self::NS_OWNCLOUD] = 'oc';
+ $server->xml->namespaceMap[self::NS_OWNCLOUD] = 'oc';
$server->protectedProperties[] = self::ID_PROPERTYNAME;
@@ -130,11 +132,11 @@ class SystemTagPlugin extends \Sabre\DAV\ServerPlugin {
*
* @param string $data
* @param string $contentType content type of the data
- *
* @return ISystemTag newly created system tag
*
- * @throws UnsupportedMediaType if the content type is not supported
* @throws BadRequest if a field was missing
+ * @throws Conflict
+ * @throws UnsupportedMediaType if the content type is not supported
*/
private function createTag($data, $contentType = 'application/json') {
if ($contentType === 'application/json') {
@@ -212,15 +214,15 @@ class SystemTagPlugin extends \Sabre\DAV\ServerPlugin {
self::USERVISIBLE_PROPERTYNAME,
self::USERASSIGNABLE_PROPERTYNAME,
], function($props) use ($path) {
- $node = $this->tree->getNodeForPath($path);
+ $node = $this->server->tree->getNodeForPath($path);
if (!($node instanceof SystemTagNode)) {
return;
}
- $tag = $node->getTag();
+ $tag = $node->getSystemTag();
$name = $tag->getName();
- $userVisible = $tag->getUserVisible();
- $userAssignable = $tag->getUserAssignable();
+ $userVisible = $tag->isUserVisible();
+ $userAssignable = $tag->isUserAssignable();
if (isset($props[self::DISPLAYNAME_PROPERTYNAME])) {
$name = $props[self::DISPLAYNAME_PROPERTYNAME];
diff --git a/apps/dav/lib/systemtag/systemtagsbyidcollection.php b/apps/dav/lib/systemtag/systemtagsbyidcollection.php
index 8643ffedd47..0164b9b0b3d 100644
--- a/apps/dav/lib/systemtag/systemtagsbyidcollection.php
+++ b/apps/dav/lib/systemtag/systemtagsbyidcollection.php
@@ -29,7 +29,6 @@ use Sabre\DAV\ICollection;
use OCP\SystemTag\ISystemTagManager;
use OCP\SystemTag\ISystemTag;
use OCP\SystemTag\TagNotFoundException;
-use OC\SystemTag\SystemTag;
class SystemTagsByIdCollection implements ICollection {
diff --git a/apps/dav/lib/systemtag/systemtagsobjectmappingcollection.php b/apps/dav/lib/systemtag/systemtagsobjectmappingcollection.php
index a0a71306f9e..6ed959fd886 100644
--- a/apps/dav/lib/systemtag/systemtagsobjectmappingcollection.php
+++ b/apps/dav/lib/systemtag/systemtagsobjectmappingcollection.php
@@ -23,7 +23,6 @@ namespace OCA\DAV\SystemTag;
use Sabre\DAV\Exception\Forbidden;
use Sabre\DAV\Exception\NotFound;
-use Sabre\DAV\Exception\MethodNotAllowed;
use Sabre\DAV\Exception\BadRequest;
use Sabre\DAV\ICollection;
@@ -31,7 +30,6 @@ use OCP\SystemTag\ISystemTagManager;
use OCP\SystemTag\ISystemTagObjectMapper;
use OCP\SystemTag\ISystemTag;
use OCP\SystemTag\TagNotFoundException;
-use OC\SystemTag\SystemTag;
/**
* Collection containing tags by object id
diff --git a/apps/dav/lib/systemtag/systemtagsobjecttypecollection.php b/apps/dav/lib/systemtag/systemtagsobjecttypecollection.php
index c90e4fd2d8d..8dee85ccd44 100644
--- a/apps/dav/lib/systemtag/systemtagsobjecttypecollection.php
+++ b/apps/dav/lib/systemtag/systemtagsobjecttypecollection.php
@@ -22,15 +22,11 @@
namespace OCA\DAV\SystemTag;
use Sabre\DAV\Exception\Forbidden;
-use Sabre\DAV\Exception\NotFound;
use Sabre\DAV\Exception\MethodNotAllowed;
use Sabre\DAV\ICollection;
use OCP\SystemTag\ISystemTagManager;
use OCP\SystemTag\ISystemTagObjectMapper;
-use OCP\SystemTag\ISystemTag;
-use OCP\SystemTag\TagNotFoundException;
-use OC\SystemTag\SystemTag;
/**
* Collection containing object ids by object type
diff --git a/apps/dav/lib/systemtag/systemtagsrelationscollection.php b/apps/dav/lib/systemtag/systemtagsrelationscollection.php
index 4bcb6882a4b..44069bca02c 100644
--- a/apps/dav/lib/systemtag/systemtagsrelationscollection.php
+++ b/apps/dav/lib/systemtag/systemtagsrelationscollection.php
@@ -21,6 +21,9 @@
namespace OCA\DAV\SystemTag;
+use OCP\SystemTag\ISystemTagManager;
+use OCP\SystemTag\ISystemTagObjectMapper;
+use Sabre\DAV\Exception\Forbidden;
use Sabre\DAV\SimpleCollection;
class SystemTagsRelationsCollection extends SimpleCollection {