Skip to content

Commit

Permalink
declare addressDataProperties to avoid PHP 8.2 deprecation notice (#1446
Browse files Browse the repository at this point in the history
)

Co-authored-by: ByteHamster <info@bytehamster.com>
  • Loading branch information
phil-davis and ByteHamster committed Oct 17, 2023
1 parent 85b33f7 commit a74464d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
9 changes: 8 additions & 1 deletion lib/CardDAV/Xml/Request/AddressBookMultiGetReport.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class AddressBookMultiGetReport implements XmlDeserializable
public $hrefs;

/**
* The mimetype of the content that should be returend. Usually
* The mimetype of the content that should be returned. Usually
* text/vcard.
*
* @var string
Expand All @@ -53,6 +53,13 @@ class AddressBookMultiGetReport implements XmlDeserializable
*/
public $version = null;

/**
* An array with requested vcard properties.
*
* @var array
*/
public $addressDataProperties;

/**
* The deserialize method is called during xml parsing.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

use Sabre\DAV\Xml\XmlTest;

class AddressBookMultiGetTest extends XmlTest
class AddressBookMultiGetReportTest extends XmlTest
{
protected $elementMap = [
'{urn:ietf:params:xml:ns:carddav}addressbook-multiget' => 'Sabre\\CardDAV\\Xml\\Request\AddressBookMultiGetReport',
Expand Down Expand Up @@ -36,7 +36,7 @@ public function testDeserialize($xml, $expectedProps, $expectedVersion = '3.0')
);
}

public function providesAddressDataXml()
public function providesAddressDataXml(): array
{
$simpleXml = <<<XML
<?xml version='1.0' encoding='UTF-8' ?>
Expand Down Expand Up @@ -83,7 +83,7 @@ public function providesAddressDataXml()
return [
'address data with version' => [$simpleXml, [], '4.0'],
'address data with inner all props' => [$allPropsXml, []],
'address data with mutliple props' => [$multiplePropsXml, ['VERSION', 'UID', 'NICKNAME', 'EMAIL', 'FN']],
'address data with multiple props' => [$multiplePropsXml, ['VERSION', 'UID', 'NICKNAME', 'EMAIL', 'FN']],
];
}
}

0 comments on commit a74464d

Please sign in to comment.