Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: Change class strings to ::class constants #1562

Merged
merged 3 commits into from
Nov 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/CalDAV/Notifications/Plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public function initialize(Server $server)
$server->on('propFind', [$this, 'propFind']);

$server->xml->namespaceMap[self::NS_CALENDARSERVER] = 'cs';
$server->resourceTypeMapping['\\Sabre\\CalDAV\\Notifications\\ICollection'] = '{'.self::NS_CALENDARSERVER.'}notification';
$server->resourceTypeMapping[\Sabre\CalDAV\Notifications\ICollection::class] = '{'.self::NS_CALENDARSERVER.'}notification';

array_push($server->protectedProperties,
'{'.self::NS_CALENDARSERVER.'}notification-URL',
Expand Down
24 changes: 12 additions & 12 deletions lib/CalDAV/Plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -200,18 +200,18 @@ public function initialize(DAV\Server $server)
$server->xml->namespaceMap[self::NS_CALDAV] = 'cal';
$server->xml->namespaceMap[self::NS_CALENDARSERVER] = 'cs';

$server->xml->elementMap['{'.self::NS_CALDAV.'}supported-calendar-component-set'] = 'Sabre\\CalDAV\\Xml\\Property\\SupportedCalendarComponentSet';
$server->xml->elementMap['{'.self::NS_CALDAV.'}calendar-query'] = 'Sabre\\CalDAV\\Xml\\Request\\CalendarQueryReport';
$server->xml->elementMap['{'.self::NS_CALDAV.'}calendar-multiget'] = 'Sabre\\CalDAV\\Xml\\Request\\CalendarMultiGetReport';
$server->xml->elementMap['{'.self::NS_CALDAV.'}free-busy-query'] = 'Sabre\\CalDAV\\Xml\\Request\\FreeBusyQueryReport';
$server->xml->elementMap['{'.self::NS_CALDAV.'}mkcalendar'] = 'Sabre\\CalDAV\\Xml\\Request\\MkCalendar';
$server->xml->elementMap['{'.self::NS_CALDAV.'}schedule-calendar-transp'] = 'Sabre\\CalDAV\\Xml\\Property\\ScheduleCalendarTransp';
$server->xml->elementMap['{'.self::NS_CALDAV.'}supported-calendar-component-set'] = 'Sabre\\CalDAV\\Xml\\Property\\SupportedCalendarComponentSet';

$server->resourceTypeMapping['\\Sabre\\CalDAV\\ICalendar'] = '{urn:ietf:params:xml:ns:caldav}calendar';

$server->resourceTypeMapping['\\Sabre\\CalDAV\\Principal\\IProxyRead'] = '{http://calendarserver.org/ns/}calendar-proxy-read';
$server->resourceTypeMapping['\\Sabre\\CalDAV\\Principal\\IProxyWrite'] = '{http://calendarserver.org/ns/}calendar-proxy-write';
$server->xml->elementMap['{'.self::NS_CALDAV.'}supported-calendar-component-set'] = \Sabre\CalDAV\Xml\Property\SupportedCalendarComponentSet::class;
$server->xml->elementMap['{'.self::NS_CALDAV.'}calendar-query'] = \Sabre\CalDAV\Xml\Request\CalendarQueryReport::class;
$server->xml->elementMap['{'.self::NS_CALDAV.'}calendar-multiget'] = \Sabre\CalDAV\Xml\Request\CalendarMultiGetReport::class;
$server->xml->elementMap['{'.self::NS_CALDAV.'}free-busy-query'] = \Sabre\CalDAV\Xml\Request\FreeBusyQueryReport::class;
$server->xml->elementMap['{'.self::NS_CALDAV.'}mkcalendar'] = \Sabre\CalDAV\Xml\Request\MkCalendar::class;
$server->xml->elementMap['{'.self::NS_CALDAV.'}schedule-calendar-transp'] = \Sabre\CalDAV\Xml\Property\ScheduleCalendarTransp::class;
$server->xml->elementMap['{'.self::NS_CALDAV.'}supported-calendar-component-set'] = \Sabre\CalDAV\Xml\Property\SupportedCalendarComponentSet::class;

$server->resourceTypeMapping[\Sabre\CalDAV\ICalendar::class] = '{urn:ietf:params:xml:ns:caldav}calendar';

$server->resourceTypeMapping[\Sabre\CalDAV\Principal\IProxyRead::class] = '{http://calendarserver.org/ns/}calendar-proxy-read';
$server->resourceTypeMapping[\Sabre\CalDAV\Principal\IProxyWrite::class] = '{http://calendarserver.org/ns/}calendar-proxy-write';

array_push($server->protectedProperties,
'{'.self::NS_CALDAV.'}supported-calendar-component-set',
Expand Down
4 changes: 2 additions & 2 deletions lib/CalDAV/Schedule/Plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,8 @@ public function initialize(Server $server)
* This information ensures that the {DAV:}resourcetype property has
* the correct values.
*/
$server->resourceTypeMapping['\\Sabre\\CalDAV\\Schedule\\IOutbox'] = $ns.'schedule-outbox';
$server->resourceTypeMapping['\\Sabre\\CalDAV\\Schedule\\IInbox'] = $ns.'schedule-inbox';
$server->resourceTypeMapping[\Sabre\CalDAV\Schedule\IOutbox::class] = $ns.'schedule-outbox';
$server->resourceTypeMapping[\Sabre\CalDAV\Schedule\IInbox::class] = $ns.'schedule-inbox';

/*
* Properties we protect are made read-only by the server.
Expand Down
4 changes: 2 additions & 2 deletions lib/CalDAV/SharingPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@ public function initialize(DAV\Server $server)
'{'.Plugin::NS_CALENDARSERVER.'}shared-url'
);

$this->server->xml->elementMap['{'.Plugin::NS_CALENDARSERVER.'}share'] = 'Sabre\\CalDAV\\Xml\\Request\\Share';
$this->server->xml->elementMap['{'.Plugin::NS_CALENDARSERVER.'}invite-reply'] = 'Sabre\\CalDAV\\Xml\\Request\\InviteReply';
$this->server->xml->elementMap['{'.Plugin::NS_CALENDARSERVER.'}share'] = \Sabre\CalDAV\Xml\Request\Share::class;
$this->server->xml->elementMap['{'.Plugin::NS_CALENDARSERVER.'}invite-reply'] = \Sabre\CalDAV\Xml\Request\InviteReply::class;

$this->server->on('propFind', [$this, 'propFindEarly']);
$this->server->on('propFind', [$this, 'propFindLate'], 150);
Expand Down
4 changes: 2 additions & 2 deletions lib/CalDAV/Subscriptions/Plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ class Plugin extends ServerPlugin
*/
public function initialize(Server $server)
{
$server->resourceTypeMapping['Sabre\\CalDAV\\Subscriptions\\ISubscription'] =
$server->resourceTypeMapping[\Sabre\CalDAV\Subscriptions\ISubscription::class] =
'{http://calendarserver.org/ns/}subscribed';

$server->xml->elementMap['{http://calendarserver.org/ns/}source'] =
'Sabre\\DAV\\Xml\\Property\\Href';
\Sabre\DAV\Xml\Property\Href::class;

$server->on('propFind', [$this, 'propFind'], 150);
}
Expand Down
4 changes: 2 additions & 2 deletions lib/CalDAV/Xml/Request/CalendarMultiGetReport.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@ class CalendarMultiGetReport implements XmlDeserializable
public static function xmlDeserialize(Reader $reader)
{
$elems = $reader->parseInnerTree([
'{urn:ietf:params:xml:ns:caldav}calendar-data' => 'Sabre\\CalDAV\\Xml\\Filter\\CalendarData',
'{DAV:}prop' => 'Sabre\\Xml\\Element\\KeyValue',
'{urn:ietf:params:xml:ns:caldav}calendar-data' => \Sabre\CalDAV\Xml\Filter\CalendarData::class,
'{DAV:}prop' => \Sabre\Xml\Element\KeyValue::class,
]);

$newProps = [
Expand Down
10 changes: 5 additions & 5 deletions lib/CalDAV/Xml/Request/CalendarQueryReport.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,11 @@ class CalendarQueryReport implements XmlDeserializable
public static function xmlDeserialize(Reader $reader)
{
$elems = $reader->parseInnerTree([
'{urn:ietf:params:xml:ns:caldav}comp-filter' => 'Sabre\\CalDAV\\Xml\\Filter\\CompFilter',
'{urn:ietf:params:xml:ns:caldav}prop-filter' => 'Sabre\\CalDAV\\Xml\\Filter\\PropFilter',
'{urn:ietf:params:xml:ns:caldav}param-filter' => 'Sabre\\CalDAV\\Xml\\Filter\\ParamFilter',
'{urn:ietf:params:xml:ns:caldav}calendar-data' => 'Sabre\\CalDAV\\Xml\\Filter\\CalendarData',
'{DAV:}prop' => 'Sabre\\Xml\\Element\\KeyValue',
'{urn:ietf:params:xml:ns:caldav}comp-filter' => \Sabre\CalDAV\Xml\Filter\CompFilter::class,
'{urn:ietf:params:xml:ns:caldav}prop-filter' => \Sabre\CalDAV\Xml\Filter\PropFilter::class,
'{urn:ietf:params:xml:ns:caldav}param-filter' => \Sabre\CalDAV\Xml\Filter\ParamFilter::class,
'{urn:ietf:params:xml:ns:caldav}calendar-data' => \Sabre\CalDAV\Xml\Filter\CalendarData::class,
'{DAV:}prop' => \Sabre\Xml\Element\KeyValue::class,
]);

$newProps = [
Expand Down
4 changes: 2 additions & 2 deletions lib/CalDAV/Xml/Request/MkCalendar.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ public static function xmlDeserialize(Reader $reader)
$self = new self();

$elementMap = $reader->elementMap;
$elementMap['{DAV:}prop'] = 'Sabre\DAV\Xml\Element\Prop';
$elementMap['{DAV:}set'] = 'Sabre\Xml\Element\KeyValue';
$elementMap['{DAV:}prop'] = \Sabre\DAV\Xml\Element\Prop::class;
$elementMap['{DAV:}set'] = \Sabre\Xml\Element\KeyValue::class;
$elems = $reader->parseInnerTree($elementMap);

foreach ($elems as $elem) {
Expand Down
4 changes: 2 additions & 2 deletions lib/CalDAV/Xml/Request/Share.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ public function __construct(array $sharees)
public static function xmlDeserialize(Reader $reader)
{
$elems = $reader->parseGetElements([
'{'.Plugin::NS_CALENDARSERVER.'}set' => 'Sabre\\Xml\\Element\\KeyValue',
'{'.Plugin::NS_CALENDARSERVER.'}remove' => 'Sabre\\Xml\\Element\\KeyValue',
'{'.Plugin::NS_CALENDARSERVER.'}set' => \Sabre\Xml\Element\KeyValue::class,
'{'.Plugin::NS_CALENDARSERVER.'}remove' => \Sabre\Xml\Element\KeyValue::class,
]);

$sharees = [];
Expand Down
10 changes: 5 additions & 5 deletions lib/CardDAV/Plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,20 +73,20 @@ public function initialize(DAV\Server $server)

$server->xml->namespaceMap[self::NS_CARDDAV] = 'card';

$server->xml->elementMap['{'.self::NS_CARDDAV.'}addressbook-query'] = 'Sabre\\CardDAV\\Xml\\Request\\AddressBookQueryReport';
$server->xml->elementMap['{'.self::NS_CARDDAV.'}addressbook-multiget'] = 'Sabre\\CardDAV\\Xml\\Request\\AddressBookMultiGetReport';
$server->xml->elementMap['{'.self::NS_CARDDAV.'}addressbook-query'] = \Sabre\CardDAV\Xml\Request\AddressBookQueryReport::class;
$server->xml->elementMap['{'.self::NS_CARDDAV.'}addressbook-multiget'] = \Sabre\CardDAV\Xml\Request\AddressBookMultiGetReport::class;

/* Mapping Interfaces to {DAV:}resourcetype values */
$server->resourceTypeMapping['Sabre\\CardDAV\\IAddressBook'] = '{'.self::NS_CARDDAV.'}addressbook';
$server->resourceTypeMapping['Sabre\\CardDAV\\IDirectory'] = '{'.self::NS_CARDDAV.'}directory';
$server->resourceTypeMapping[\Sabre\CardDAV\IAddressBook::class] = '{'.self::NS_CARDDAV.'}addressbook';
$server->resourceTypeMapping[\Sabre\CardDAV\IDirectory::class] = '{'.self::NS_CARDDAV.'}directory';

/* Adding properties that may never be changed */
$server->protectedProperties[] = '{'.self::NS_CARDDAV.'}supported-address-data';
$server->protectedProperties[] = '{'.self::NS_CARDDAV.'}max-resource-size';
$server->protectedProperties[] = '{'.self::NS_CARDDAV.'}addressbook-home-set';
$server->protectedProperties[] = '{'.self::NS_CARDDAV.'}supported-collation-set';

$server->xml->elementMap['{http://calendarserver.org/ns/}me-card'] = 'Sabre\\DAV\\Xml\\Property\\Href';
$server->xml->elementMap['{http://calendarserver.org/ns/}me-card'] = \Sabre\DAV\Xml\Property\Href::class;

$this->server = $server;
}
Expand Down
4 changes: 2 additions & 2 deletions lib/CardDAV/Xml/Request/AddressBookMultiGetReport.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@ class AddressBookMultiGetReport implements XmlDeserializable
public static function xmlDeserialize(Reader $reader)
{
$elems = $reader->parseInnerTree([
'{urn:ietf:params:xml:ns:carddav}address-data' => 'Sabre\\CardDAV\\Xml\\Filter\\AddressData',
'{DAV:}prop' => 'Sabre\\Xml\\Element\\KeyValue',
'{urn:ietf:params:xml:ns:carddav}address-data' => \Sabre\CardDAV\Xml\Filter\AddressData::class,
'{DAV:}prop' => \Sabre\Xml\Element\KeyValue::class,
]);

$newProps = [
Expand Down
8 changes: 4 additions & 4 deletions lib/CardDAV/Xml/Request/AddressBookQueryReport.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,10 +120,10 @@ class AddressBookQueryReport implements XmlDeserializable
public static function xmlDeserialize(Reader $reader)
{
$elems = (array) $reader->parseInnerTree([
'{urn:ietf:params:xml:ns:carddav}prop-filter' => 'Sabre\\CardDAV\\Xml\\Filter\\PropFilter',
'{urn:ietf:params:xml:ns:carddav}param-filter' => 'Sabre\\CardDAV\\Xml\\Filter\\ParamFilter',
'{urn:ietf:params:xml:ns:carddav}address-data' => 'Sabre\\CardDAV\\Xml\\Filter\\AddressData',
'{DAV:}prop' => 'Sabre\\Xml\\Element\\KeyValue',
'{urn:ietf:params:xml:ns:carddav}prop-filter' => \Sabre\CardDAV\Xml\Filter\PropFilter::class,
'{urn:ietf:params:xml:ns:carddav}param-filter' => \Sabre\CardDAV\Xml\Filter\ParamFilter::class,
'{urn:ietf:params:xml:ns:carddav}address-data' => \Sabre\CardDAV\Xml\Filter\AddressData::class,
'{DAV:}prop' => \Sabre\Xml\Element\KeyValue::class,
]);

$newProps = [
Expand Down
2 changes: 1 addition & 1 deletion lib/DAV/Browser/Plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,7 @@ public function htmlActionsPanel(DAV\INode $node, &$output, $path)

// We also know fairly certain that if an object is a non-extended
// SimpleCollection, we won't need to show the panel either.
if ('Sabre\\DAV\\SimpleCollection' === get_class($node)) {
if (\Sabre\DAV\SimpleCollection::class === get_class($node)) {
return;
}

Expand Down
2 changes: 1 addition & 1 deletion lib/DAV/Locks/Plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public function initialize(DAV\Server $server)
{
$this->server = $server;

$this->server->xml->elementMap['{DAV:}lockinfo'] = 'Sabre\\DAV\\Xml\\Request\\Lock';
$this->server->xml->elementMap['{DAV:}lockinfo'] = \Sabre\DAV\Xml\Request\Lock::class;

$server->on('method:LOCK', [$this, 'httpLock']);
$server->on('method:UNLOCK', [$this, 'httpUnlock']);
Expand Down
2 changes: 1 addition & 1 deletion lib/DAV/Server.php
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ class Server implements LoggerAwareInterface, EmitterInterface
* @var array
*/
public $resourceTypeMapping = [
'Sabre\\DAV\\ICollection' => '{DAV:}collection',
\Sabre\DAV\ICollection::class => '{DAV:}collection',
];

/**
Expand Down
2 changes: 1 addition & 1 deletion lib/DAV/Sharing/Plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public function initialize(Server $server)
{
$this->server = $server;

$server->xml->elementMap['{DAV:}share-resource'] = 'Sabre\\DAV\\Xml\\Request\\ShareResource';
$server->xml->elementMap['{DAV:}share-resource'] = \Sabre\DAV\Xml\Request\ShareResource::class;

array_push(
$server->protectedProperties,
Expand Down
2 changes: 1 addition & 1 deletion lib/DAV/Sync/Plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public function getPluginName()
public function initialize(DAV\Server $server)
{
$this->server = $server;
$server->xml->elementMap['{DAV:}sync-collection'] = 'Sabre\\DAV\\Xml\\Request\\SyncCollectionReport';
$server->xml->elementMap['{DAV:}sync-collection'] = \Sabre\DAV\Xml\Request\SyncCollectionReport::class;

$self = $this;

Expand Down
2 changes: 1 addition & 1 deletion lib/DAV/Xml/Element/Prop.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ private static function parseCurrentElement(Reader $reader)

if (array_key_exists($name, $reader->elementMap)) {
$deserializer = $reader->elementMap[$name];
if (is_subclass_of($deserializer, 'Sabre\\Xml\\XmlDeserializable')) {
if (is_subclass_of($deserializer, \Sabre\Xml\XmlDeserializable::class)) {
$value = call_user_func([$deserializer, 'xmlDeserialize'], $reader);
} elseif (is_callable($deserializer)) {
$value = call_user_func($deserializer, $reader);
Expand Down
2 changes: 1 addition & 1 deletion lib/DAV/Xml/Element/Response.php
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ public static function xmlDeserialize(Reader $reader)
{
$reader->pushContext();

$reader->elementMap['{DAV:}propstat'] = 'Sabre\\Xml\\Element\\KeyValue';
$reader->elementMap['{DAV:}propstat'] = \Sabre\Xml\Element\KeyValue::class;

// We are overriding the parser for {DAV:}prop. This deserializer is
// almost identical to the one for Sabre\Xml\Element\KeyValue.
Expand Down
2 changes: 1 addition & 1 deletion lib/DAV/Xml/Element/Sharee.php
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ public static function xmlDeserialize(Reader $reader)
{
// Temporarily override configuration
$reader->pushContext();
$reader->elementMap['{DAV:}share-access'] = 'Sabre\DAV\Xml\Property\ShareAccess';
$reader->elementMap['{DAV:}share-access'] = \Sabre\DAV\Xml\Property\ShareAccess::class;
$reader->elementMap['{DAV:}prop'] = 'Sabre\Xml\Deserializer\keyValue';

$elems = Deserializer\keyValue($reader, 'DAV:');
Expand Down
2 changes: 1 addition & 1 deletion lib/DAV/Xml/Request/Lock.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ class Lock implements XmlDeserializable
public static function xmlDeserialize(Reader $reader)
{
$reader->pushContext();
$reader->elementMap['{DAV:}owner'] = 'Sabre\\Xml\\Element\\XmlFragment';
$reader->elementMap['{DAV:}owner'] = \Sabre\Xml\Element\XmlFragment::class;

$values = KeyValue::xmlDeserialize($reader);

Expand Down
6 changes: 3 additions & 3 deletions lib/DAV/Xml/Request/MkCol.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,9 @@ public static function xmlDeserialize(Reader $reader)
$self = new self();

$elementMap = $reader->elementMap;
$elementMap['{DAV:}prop'] = 'Sabre\DAV\Xml\Element\Prop';
$elementMap['{DAV:}set'] = 'Sabre\Xml\Element\KeyValue';
$elementMap['{DAV:}remove'] = 'Sabre\Xml\Element\KeyValue';
$elementMap['{DAV:}prop'] = \Sabre\DAV\Xml\Element\Prop::class;
$elementMap['{DAV:}set'] = \Sabre\Xml\Element\KeyValue::class;
$elementMap['{DAV:}remove'] = \Sabre\Xml\Element\KeyValue::class;

$elems = $reader->parseInnerTree($elementMap);

Expand Down
2 changes: 1 addition & 1 deletion lib/DAV/Xml/Request/PropFind.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public static function xmlDeserialize(Reader $reader)
$self = new self();

$reader->pushContext();
$reader->elementMap['{DAV:}prop'] = 'Sabre\Xml\Element\Elements';
$reader->elementMap['{DAV:}prop'] = \Sabre\Xml\Element\Elements::class;

foreach (KeyValue::xmlDeserialize($reader) as $k => $v) {
switch ($k) {
Expand Down
6 changes: 3 additions & 3 deletions lib/DAV/Xml/Request/PropPatch.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,9 @@ public static function xmlDeserialize(Reader $reader)
$self = new self();

$elementMap = $reader->elementMap;
$elementMap['{DAV:}prop'] = 'Sabre\DAV\Xml\Element\Prop';
$elementMap['{DAV:}set'] = 'Sabre\Xml\Element\KeyValue';
$elementMap['{DAV:}remove'] = 'Sabre\Xml\Element\KeyValue';
$elementMap['{DAV:}prop'] = \Sabre\DAV\Xml\Element\Prop::class;
$elementMap['{DAV:}set'] = \Sabre\Xml\Element\KeyValue::class;
$elementMap['{DAV:}remove'] = \Sabre\Xml\Element\KeyValue::class;

$elems = $reader->parseInnerTree($elementMap);

Expand Down
4 changes: 2 additions & 2 deletions lib/DAV/Xml/Request/ShareResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ public function __construct(array $sharees)
public static function xmlDeserialize(Reader $reader)
{
$elems = $reader->parseInnerTree([
'{DAV:}sharee' => 'Sabre\DAV\Xml\Element\Sharee',
'{DAV:}share-access' => 'Sabre\DAV\Xml\Property\ShareAccess',
'{DAV:}sharee' => \Sabre\DAV\Xml\Element\Sharee::class,
'{DAV:}share-access' => \Sabre\DAV\Xml\Property\ShareAccess::class,
'{DAV:}prop' => 'Sabre\Xml\Deserializer\keyValue',
]);

Expand Down
2 changes: 1 addition & 1 deletion lib/DAV/Xml/Request/SyncCollectionReport.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public static function xmlDeserialize(Reader $reader)

$reader->pushContext();

$reader->elementMap['{DAV:}prop'] = 'Sabre\Xml\Element\Elements';
$reader->elementMap['{DAV:}prop'] = \Sabre\Xml\Element\Elements::class;
$elems = KeyValue::xmlDeserialize($reader);

$reader->popContext();
Expand Down
2 changes: 1 addition & 1 deletion lib/DAV/Xml/Response/MultiStatus.php
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ public function xmlSerialize(Writer $writer): void
public static function xmlDeserialize(Reader $reader)
{
$elementMap = $reader->elementMap;
$elementMap['{DAV:}prop'] = 'Sabre\\DAV\\Xml\\Element\\Prop';
$elementMap['{DAV:}prop'] = \Sabre\DAV\Xml\Element\Prop::class;
$elements = $reader->parseInnerTree($elementMap);

$responses = [];
Expand Down
12 changes: 6 additions & 6 deletions lib/DAV/Xml/Service.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,16 @@ class Service extends \Sabre\Xml\Service
* be mapped to Sabre\DAV\Xml\Request\PropFind
*/
public array $elementMap = [
'{DAV:}multistatus' => 'Sabre\\DAV\\Xml\\Response\\MultiStatus',
'{DAV:}response' => 'Sabre\\DAV\\Xml\\Element\\Response',
'{DAV:}multistatus' => \Sabre\DAV\Xml\Response\MultiStatus::class,
'{DAV:}response' => \Sabre\DAV\Xml\Element\Response::class,

// Requests
'{DAV:}propfind' => 'Sabre\\DAV\\Xml\\Request\\PropFind',
'{DAV:}propertyupdate' => 'Sabre\\DAV\\Xml\\Request\\PropPatch',
'{DAV:}mkcol' => 'Sabre\\DAV\\Xml\\Request\\MkCol',
'{DAV:}propfind' => \Sabre\DAV\Xml\Request\PropFind::class,
'{DAV:}propertyupdate' => \Sabre\DAV\Xml\Request\PropPatch::class,
'{DAV:}mkcol' => \Sabre\DAV\Xml\Request\MkCol::class,

// Properties
'{DAV:}resourcetype' => 'Sabre\\DAV\\Xml\\Property\\ResourceType',
'{DAV:}resourcetype' => \Sabre\DAV\Xml\Property\ResourceType::class,
];

/**
Expand Down
Loading