]> source.dussan.org Git - nextcloud-server.git/commitdiff
Fix PHPDoc ...
authorThomas Müller <thomas.mueller@tmit.eu>
Wed, 2 Dec 2015 20:17:03 +0000 (21:17 +0100)
committerVincent Petry <pvince81@owncloud.com>
Thu, 3 Dec 2015 14:23:21 +0000 (15:23 +0100)
apps/dav/lib/systemtag/systemtagmappingnode.php
apps/dav/lib/systemtag/systemtagnode.php
apps/dav/lib/systemtag/systemtagplugin.php
apps/dav/lib/systemtag/systemtagsbyidcollection.php
apps/dav/lib/systemtag/systemtagsobjectmappingcollection.php
apps/dav/lib/systemtag/systemtagsobjecttypecollection.php
apps/dav/lib/systemtag/systemtagsrelationscollection.php

index 97c1afc1401c392b276fd93f866dfe942fafa39b..03088d734d3225f50b1be95f4369e1cace4b9d74 100644 (file)
@@ -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,
index e425595352e795aa719e0b8e3e554b1decf5dc93..b09a77379307d2aa3fffc3e2d4da7276384f24f8 100644 (file)
@@ -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 {
index c2136409649789c2eb75a88f267a6b219816a629..d5591c284930736a356903926e68b0bf6507c376 100644 (file)
  */
 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];
index 8643ffedd473f905514e35b91b9df557cf7767fd..0164b9b0b3d269dc07c8c7ebe4c07602452fbd57 100644 (file)
@@ -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 {
 
index a0a71306f9ed1d1b1fd0f33ecefe97cdb16ec898..6ed959fd886fb642a344bf15950caef57dadb5be 100644 (file)
@@ -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
index c90e4fd2d8d33cc393c041988dc0f7928bead121..8dee85ccd449aebc88cfcacd16f3127f1c751402 100644 (file)
 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
index 4bcb6882a4b705b9492298f9ee49ede2bd7bb6ae..44069bca02c9b0087412cbacf18606cd09e7be06 100644 (file)
@@ -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 {