[Pkg-owncloud-commits] [php-sabredav] 171/275: supported-address-data
David Prévot
taffit at moszumanska.debian.org
Thu Sep 25 14:56:04 UTC 2014
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository php-sabredav.
commit 34eb76cb1ccbb3ccd110648ae31a5ada6b1a6fed
Author: Evert Pot <me at evertpot.com>
Date: Thu Aug 21 16:47:20 2014 -0400
supported-address-data
---
lib/CardDAV/Property/SupportedAddressData.php | 15 ++++++++-------
tests/Sabre/CardDAV/Property/SupportedAddressDataTest.php | 3 ++-
2 files changed, 10 insertions(+), 8 deletions(-)
diff --git a/lib/CardDAV/Property/SupportedAddressData.php b/lib/CardDAV/Property/SupportedAddressData.php
index 5d0aa8a..211b9fd 100644
--- a/lib/CardDAV/Property/SupportedAddressData.php
+++ b/lib/CardDAV/Property/SupportedAddressData.php
@@ -22,20 +22,21 @@ class SupportedAddressData extends DAV\Property {
*
* @var array
*/
- protected $supportedData = array();
+ protected $supportedData = [];
/**
* Creates the property
*
* @param array|null $supportedData
*/
- public function __construct(array $supportedData = null) {
+ function __construct(array $supportedData = null) {
if (is_null($supportedData)) {
- $supportedData = array(
- array('contentType' => 'text/vcard', 'version' => '3.0'),
- // array('contentType' => 'text/vcard', 'version' => '4.0'),
- );
+ $supportedData = [
+ ['contentType' => 'text/vcard', 'version' => '3.0'],
+ ['contentType' => 'text/vcard', 'version' => '4.0'],
+ ['contentType' => 'application/vcard+json', 'version' => '4.0'],
+ ];
}
$this->supportedData = $supportedData;
@@ -49,7 +50,7 @@ class SupportedAddressData extends DAV\Property {
* @param \DOMElement $node
* @return void
*/
- public function serialize(DAV\Server $server,\DOMElement $node) {
+ function serialize(DAV\Server $server,\DOMElement $node) {
$doc = $node->ownerDocument;
diff --git a/tests/Sabre/CardDAV/Property/SupportedAddressDataTest.php b/tests/Sabre/CardDAV/Property/SupportedAddressDataTest.php
index 211a8c9..416f865 100644
--- a/tests/Sabre/CardDAV/Property/SupportedAddressDataTest.php
+++ b/tests/Sabre/CardDAV/Property/SupportedAddressDataTest.php
@@ -36,7 +36,8 @@ class SupportedAddressDataDataTest extends \PHPUnit_Framework_TestCase {
'<?xml version="1.0"?>
<card:root xmlns:card="' . CardDAV\Plugin::NS_CARDDAV . '" xmlns:d="DAV:">' .
'<card:address-data-type content-type="text/vcard" version="3.0"/>' .
-//'<card:address-data-type content-type="text/vcard" version="4.0"/>' .
+'<card:address-data-type content-type="text/vcard" version="4.0"/>' .
+'<card:address-data-type content-type="application/vcard+json" version="4.0"/>' .
'</card:root>
', $xml);
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/php-sabredav.git
More information about the Pkg-owncloud-commits
mailing list