aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/sabre/vobject/lib/Property/Uri.php
diff options
context:
space:
mode:
authorMax Kostikov <max@kostikov.co>2019-05-02 11:33:07 +0200
committerMax Kostikov <max@kostikov.co>2019-05-02 11:33:07 +0200
commit47fba5827bd106f53625b543f30643ca5ba1c16e (patch)
treebef05781eacc6dbc67d03899e0dde0257ce58096 /vendor/sabre/vobject/lib/Property/Uri.php
parent47f75ad8bfbe8325a76ae6fe466aa8080fc87045 (diff)
parent516167c0f8579c8a068b6e52557e7e1109f897ae (diff)
downloadvolse-hubzilla-47fba5827bd106f53625b543f30643ca5ba1c16e.tar.gz
volse-hubzilla-47fba5827bd106f53625b543f30643ca5ba1c16e.tar.bz2
volse-hubzilla-47fba5827bd106f53625b543f30643ca5ba1c16e.zip
Merge branch 'dev' into 'dev'
# Conflicts: # Zotlabs/Lib/ThreadItem.php
Diffstat (limited to 'vendor/sabre/vobject/lib/Property/Uri.php')
-rw-r--r--vendor/sabre/vobject/lib/Property/Uri.php34
1 files changed, 14 insertions, 20 deletions
diff --git a/vendor/sabre/vobject/lib/Property/Uri.php b/vendor/sabre/vobject/lib/Property/Uri.php
index 88fcfaab8..3449ba1f2 100644
--- a/vendor/sabre/vobject/lib/Property/Uri.php
+++ b/vendor/sabre/vobject/lib/Property/Uri.php
@@ -14,8 +14,8 @@ use Sabre\VObject\Property;
* @author Evert Pot (http://evertpot.com/)
* @license http://sabre.io/license/ Modified BSD License
*/
-class Uri extends Text {
-
+class Uri extends Text
+{
/**
* In case this is a multi-value property. This string will be used as a
* delimiter.
@@ -32,10 +32,9 @@ class Uri extends Text {
*
* @return string
*/
- function getValueType() {
-
+ public function getValueType()
+ {
return 'URI';
-
}
/**
@@ -43,8 +42,8 @@ class Uri extends Text {
*
* @return array
*/
- function parameters() {
-
+ public function parameters()
+ {
$parameters = parent::parameters();
if (!isset($parameters['VALUE']) && in_array($this->name, ['URL', 'PHOTO'])) {
// If we are encoding a URI value, and this URI value has no
@@ -57,8 +56,8 @@ class Uri extends Text {
// See Issue #227 and #235
$parameters['VALUE'] = new Parameter($this->root, 'VALUE', 'URI');
}
- return $parameters;
+ return $parameters;
}
/**
@@ -68,11 +67,9 @@ class Uri extends Text {
* not yet done, but parameters are not included.
*
* @param string $val
- *
- * @return void
*/
- function setRawMimeDirValue($val) {
-
+ public function setRawMimeDirValue($val)
+ {
// Normally we don't need to do any type of unescaping for these
// properties, however.. we've noticed that Google Contacts
// specifically escapes the colon (:) with a blackslash. While I have
@@ -81,16 +78,16 @@ class Uri extends Text {
//
// Good thing backslashes are not allowed in urls. Makes it easy to
// assume that a backslash is always intended as an escape character.
- if ($this->name === 'URL') {
+ if ('URL' === $this->name) {
$regex = '# (?: (\\\\ (?: \\\\ | : ) ) ) #x';
$matches = preg_split($regex, $val, -1, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY);
$newVal = '';
foreach ($matches as $match) {
switch ($match) {
- case '\:' :
+ case '\:':
$newVal .= ':';
break;
- default :
+ default:
$newVal .= $match;
break;
}
@@ -99,7 +96,6 @@ class Uri extends Text {
} else {
$this->value = strtr($val, ['\,' => ',']);
}
-
}
/**
@@ -107,8 +103,8 @@ class Uri extends Text {
*
* @return string
*/
- function getRawMimeDirValue() {
-
+ public function getRawMimeDirValue()
+ {
if (is_array($this->value)) {
$value = $this->value[0];
} else {
@@ -116,7 +112,5 @@ class Uri extends Text {
}
return strtr($value, [',' => '\,']);
-
}
-
}