summaryrefslogtreecommitdiffstats
path: root/apps/dav/lib
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2018-01-25 23:16:13 +0100
committerMorris Jobke <hey@morrisjobke.de>2018-01-29 12:03:47 +0100
commiteb51f06a3b9e42686f462b9f7a56411d3fe6cb27 (patch)
tree0d96c86c4489b4e3fe60bcceaeb6759d856a36e9 /apps/dav/lib
parent1d8b90b8d3c8a85104d223b7f1d5693280370774 (diff)
downloadnextcloud-server-eb51f06a3b9e42686f462b9f7a56411d3fe6cb27.tar.gz
nextcloud-server-eb51f06a3b9e42686f462b9f7a56411d3fe6cb27.zip
Use ::class statement instead of string
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Diffstat (limited to 'apps/dav/lib')
-rw-r--r--apps/dav/lib/CalDAV/Search/SearchPlugin.php3
-rw-r--r--apps/dav/lib/Connector/Sabre/DavAclPlugin.php3
-rw-r--r--apps/dav/lib/Connector/Sabre/SharesPlugin.php2
-rw-r--r--apps/dav/lib/Connector/Sabre/TagsPlugin.php2
-rw-r--r--apps/dav/lib/DAV/Sharing/Plugin.php5
5 files changed, 9 insertions, 6 deletions
diff --git a/apps/dav/lib/CalDAV/Search/SearchPlugin.php b/apps/dav/lib/CalDAV/Search/SearchPlugin.php
index 37000aa2eb8..e984267ff37 100644
--- a/apps/dav/lib/CalDAV/Search/SearchPlugin.php
+++ b/apps/dav/lib/CalDAV/Search/SearchPlugin.php
@@ -23,6 +23,7 @@
*/
namespace OCA\DAV\CalDAV\Search;
+use OCA\DAV\CalDAV\Search\Xml\Request\CalendarSearchReport;
use Sabre\DAV\Server;
use Sabre\DAV\ServerPlugin;
use OCA\DAV\CalDAV\CalendarHome;
@@ -78,7 +79,7 @@ class SearchPlugin extends ServerPlugin {
$server->on('report', [$this, 'report']);
$server->xml->elementMap['{' . self::NS_Nextcloud . '}calendar-search'] =
- 'OCA\\DAV\\CalDAV\\Search\\Xml\\Request\\CalendarSearchReport';
+ CalendarSearchReport::class;
}
/**
diff --git a/apps/dav/lib/Connector/Sabre/DavAclPlugin.php b/apps/dav/lib/Connector/Sabre/DavAclPlugin.php
index e77edd48651..fe747ee723b 100644
--- a/apps/dav/lib/Connector/Sabre/DavAclPlugin.php
+++ b/apps/dav/lib/Connector/Sabre/DavAclPlugin.php
@@ -27,6 +27,7 @@ use Sabre\CalDAV\Principal\User;
use Sabre\DAV\Exception\NotFound;
use Sabre\DAV\INode;
use \Sabre\DAV\PropFind;
+use OCA\DAV\CardDAV\AddressBook;
/**
* Class DavAclPlugin is a wrapper around \Sabre\DAVACL\Plugin that returns 404
@@ -49,7 +50,7 @@ class DavAclPlugin extends \Sabre\DAVACL\Plugin {
$node = $this->server->tree->getNodeForPath($uri);
switch(get_class($node)) {
- case 'OCA\DAV\CardDAV\AddressBook':
+ case AddressBook::class:
$type = 'Addressbook';
break;
default:
diff --git a/apps/dav/lib/Connector/Sabre/SharesPlugin.php b/apps/dav/lib/Connector/Sabre/SharesPlugin.php
index 811a1fbfcbe..825b9821a2a 100644
--- a/apps/dav/lib/Connector/Sabre/SharesPlugin.php
+++ b/apps/dav/lib/Connector/Sabre/SharesPlugin.php
@@ -102,7 +102,7 @@ class SharesPlugin extends \Sabre\DAV\ServerPlugin {
*/
public function initialize(\Sabre\DAV\Server $server) {
$server->xml->namespacesMap[self::NS_OWNCLOUD] = 'oc';
- $server->xml->elementMap[self::SHARETYPES_PROPERTYNAME] = 'OCA\\DAV\\Connector\\Sabre\\ShareTypeList';
+ $server->xml->elementMap[self::SHARETYPES_PROPERTYNAME] = ShareTypeList::class;
$server->protectedProperties[] = self::SHARETYPES_PROPERTYNAME;
$this->server = $server;
diff --git a/apps/dav/lib/Connector/Sabre/TagsPlugin.php b/apps/dav/lib/Connector/Sabre/TagsPlugin.php
index 229826c0a7a..c9c9ec8661f 100644
--- a/apps/dav/lib/Connector/Sabre/TagsPlugin.php
+++ b/apps/dav/lib/Connector/Sabre/TagsPlugin.php
@@ -112,7 +112,7 @@ class TagsPlugin extends \Sabre\DAV\ServerPlugin
public function initialize(\Sabre\DAV\Server $server) {
$server->xml->namespaceMap[self::NS_OWNCLOUD] = 'oc';
- $server->xml->elementMap[self::TAGS_PROPERTYNAME] = 'OCA\\DAV\\Connector\\Sabre\\TagList';
+ $server->xml->elementMap[self::TAGS_PROPERTYNAME] = TagList::class;
$this->server = $server;
$this->server->on('propFind', array($this, 'handleGetProperties'));
diff --git a/apps/dav/lib/DAV/Sharing/Plugin.php b/apps/dav/lib/DAV/Sharing/Plugin.php
index 2ac65f94478..4d44c116427 100644
--- a/apps/dav/lib/DAV/Sharing/Plugin.php
+++ b/apps/dav/lib/DAV/Sharing/Plugin.php
@@ -25,6 +25,7 @@ namespace OCA\DAV\DAV\Sharing;
use OCA\DAV\Connector\Sabre\Auth;
use OCA\DAV\DAV\Sharing\Xml\Invite;
+use OCA\DAV\DAV\Sharing\Xml\ShareRequest;
use OCP\IRequest;
use Sabre\DAV\Exception\NotFound;
use Sabre\DAV\INode;
@@ -100,8 +101,8 @@ class Plugin extends ServerPlugin {
*/
function initialize(Server $server) {
$this->server = $server;
- $this->server->xml->elementMap['{' . Plugin::NS_OWNCLOUD . '}share'] = 'OCA\\DAV\\DAV\\Sharing\\Xml\\ShareRequest';
- $this->server->xml->elementMap['{' . Plugin::NS_OWNCLOUD . '}invite'] = 'OCA\\DAV\\DAV\\Sharing\\Xml\\Invite';
+ $this->server->xml->elementMap['{' . Plugin::NS_OWNCLOUD . '}share'] = ShareRequest::class;
+ $this->server->xml->elementMap['{' . Plugin::NS_OWNCLOUD . '}invite'] = Invite::class;
$this->server->on('method:POST', [$this, 'httpPost']);
$this->server->on('propFind', [$this, 'propFind']);