aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/sabre/vobject/lib/Property/Uri.php
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2019-04-25 11:47:18 +0200
committerMario Vavti <mario@mariovavti.com>2019-04-25 11:47:18 +0200
commita60c2f38c689f254bd8bb8e7ea9af78bf21c1f84 (patch)
tree65d1d73918ccb1d4ccc36184d70af2e8dd91f28e /vendor/sabre/vobject/lib/Property/Uri.php
parentf1c07977809ce3221286d53e99f0d91145b1166f (diff)
downloadvolse-hubzilla-a60c2f38c689f254bd8bb8e7ea9af78bf21c1f84.tar.gz
volse-hubzilla-a60c2f38c689f254bd8bb8e7ea9af78bf21c1f84.tar.bz2
volse-hubzilla-a60c2f38c689f254bd8bb8e7ea9af78bf21c1f84.zip
update sabre/vobject
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, [',' => '\,']);
-
}
-
}