aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/sabre/vobject/lib/VCardConverter.php
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2020-11-05 08:46:42 +0000
committerMario <mario@mariovavti.com>2020-11-05 08:46:42 +0000
commitbafbf0416462c6f18c3fb6c8c06a063c8d6fdae6 (patch)
tree8929845be585b09d0f420621281c5531e1efad3e /vendor/sabre/vobject/lib/VCardConverter.php
parent6f93d9848c43019d43ea76c27d42d657ba031cd7 (diff)
parentfdefa101d84dc2a9424eaedbdb003a4c30ec5d01 (diff)
downloadvolse-hubzilla-bafbf0416462c6f18c3fb6c8c06a063c8d6fdae6.tar.gz
volse-hubzilla-bafbf0416462c6f18c3fb6c8c06a063c8d6fdae6.tar.bz2
volse-hubzilla-bafbf0416462c6f18c3fb6c8c06a063c8d6fdae6.zip
Merge branch '5.0RC'5.0
Diffstat (limited to 'vendor/sabre/vobject/lib/VCardConverter.php')
-rw-r--r--vendor/sabre/vobject/lib/VCardConverter.php25
1 files changed, 8 insertions, 17 deletions
diff --git a/vendor/sabre/vobject/lib/VCardConverter.php b/vendor/sabre/vobject/lib/VCardConverter.php
index 156b83b4e..04932fe67 100644
--- a/vendor/sabre/vobject/lib/VCardConverter.php
+++ b/vendor/sabre/vobject/lib/VCardConverter.php
@@ -26,8 +26,7 @@ class VCardConverter
*
* If input and output version are identical, a clone is returned.
*
- * @param Component\VCard $input
- * @param int $targetVersion
+ * @param int $targetVersion
*/
public function convert(Component\VCard $input, $targetVersion)
{
@@ -62,10 +61,7 @@ class VCardConverter
/**
* Handles conversion of a single property.
*
- * @param Component\VCard $input
- * @param Component\VCard $output
- * @param Property $property
- * @param int $targetVersion
+ * @param int $targetVersion
*/
protected function convertProperty(Component\VCard $input, Component\VCard $output, Property $property, $targetVersion)
{
@@ -83,6 +79,9 @@ class VCardConverter
if (!$valueType) {
$valueType = $property->getValueType();
}
+ if (Document::VCARD30 !== $targetVersion && 'PHONE-NUMBER' === $valueType) {
+ $valueType = null;
+ }
$newProperty = $output->createProperty(
$property->name,
$property->getParts(),
@@ -227,7 +226,7 @@ class VCardConverter
// Lastly, we need to see if there's a need for a VALUE parameter.
//
- // We can do that by instantating a empty property with that name, and
+ // We can do that by instantiating a empty property with that name, and
// seeing if the default valueType is identical to the current one.
$tempProperty = $output->createProperty($newProperty->name);
if ($tempProperty->getValueType() !== $newProperty->getValueType()) {
@@ -242,8 +241,7 @@ class VCardConverter
*
* vCard 4.0 no longer supports BINARY properties.
*
- * @param Component\VCard $output
- * @param Property\Uri $property the input property
+ * @param Property\Uri $property the input property
* @param $parameters list of parameters that will eventually be added to
* the new property
*
@@ -296,8 +294,7 @@ class VCardConverter
* be valid in vCard 3.0 as well, we should convert those to BINARY if
* possible, to improve compatibility.
*
- * @param Component\VCard $output
- * @param Property\Uri $property the input property
+ * @param Property\Uri $property the input property
*
* @return Property\Binary|null
*/
@@ -344,9 +341,6 @@ class VCardConverter
/**
* Adds parameters to a new property for vCard 4.0.
- *
- * @param Property $newProperty
- * @param array $parameters
*/
protected function convertParameters40(Property $newProperty, array $parameters)
{
@@ -383,9 +377,6 @@ class VCardConverter
/**
* Adds parameters to a new property for vCard 3.0.
- *
- * @param Property $newProperty
- * @param array $parameters
*/
protected function convertParameters30(Property $newProperty, array $parameters)
{