From e779335d060b3a51d6a144d23af4097ae6801473 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Thu, 25 Apr 2019 08:52:50 +0200 Subject: update composer libs --- vendor/sabre/vobject/lib/Property/FloatValue.php | 54 +++++++++--------------- 1 file changed, 19 insertions(+), 35 deletions(-) (limited to 'vendor/sabre/vobject/lib/Property/FloatValue.php') diff --git a/vendor/sabre/vobject/lib/Property/FloatValue.php b/vendor/sabre/vobject/lib/Property/FloatValue.php index 15b119549..208d74516 100644 --- a/vendor/sabre/vobject/lib/Property/FloatValue.php +++ b/vendor/sabre/vobject/lib/Property/FloatValue.php @@ -15,8 +15,8 @@ use Sabre\Xml; * @author Evert Pot (http://evertpot.com/) * @license http://sabre.io/license/ Modified BSD License */ -class FloatValue extends Property { - +class FloatValue extends Property +{ /** * In case this is a multi-value property. This string will be used as a * delimiter. @@ -32,17 +32,14 @@ class FloatValue extends Property { * not yet done, but parameters are not included. * * @param string $val - * - * @return void */ - function setRawMimeDirValue($val) { - + public function setRawMimeDirValue($val) + { $val = explode($this->delimiter, $val); foreach ($val as &$item) { - $item = (float)$item; + $item = (float) $item; } $this->setParts($val); - } /** @@ -50,13 +47,12 @@ class FloatValue extends Property { * * @return string */ - function getRawMimeDirValue() { - + public function getRawMimeDirValue() + { return implode( $this->delimiter, $this->getParts() ); - } /** @@ -67,10 +63,9 @@ class FloatValue extends Property { * * @return string */ - function getValueType() { - + public function getValueType() + { return 'FLOAT'; - } /** @@ -80,20 +75,19 @@ class FloatValue extends Property { * * @return array */ - function getJsonValue() { - + public function getJsonValue() + { $val = array_map('floatval', $this->getParts()); // Special-casing the GEO property. // // See: // http://tools.ietf.org/html/draft-ietf-jcardcal-jcal-04#section-3.4.1.2 - if ($this->name === 'GEO') { + if ('GEO' === $this->name) { return [$val]; } return $val; - } /** @@ -101,42 +95,32 @@ class FloatValue extends Property { * object. * * @param array $value - * - * @return void */ - function setXmlValue(array $value) { - + public function setXmlValue(array $value) + { $value = array_map('floatval', $value); parent::setXmlValue($value); - } /** * This method serializes only the value of a property. This is used to * create xCard or xCal documents. * - * @param Xml\Writer $writer XML writer. - * - * @return void + * @param Xml\Writer $writer XML writer */ - protected function xmlSerializeValue(Xml\Writer $writer) { - + protected function xmlSerializeValue(Xml\Writer $writer) + { // Special-casing the GEO property. // // See: // http://tools.ietf.org/html/rfc6321#section-3.4.1.2 - if ($this->name === 'GEO') { - + if ('GEO' === $this->name) { $value = array_map('floatval', $this->getParts()); $writer->writeElement('latitude', $value[0]); $writer->writeElement('longitude', $value[1]); - - } - else { + } else { parent::xmlSerializeValue($writer); } - } - } -- cgit v1.2.3 From f1c07977809ce3221286d53e99f0d91145b1166f Mon Sep 17 00:00:00 2001 From: Mario Date: Thu, 25 Apr 2019 11:24:09 +0200 Subject: Revert "update composer libs" This reverts commit e779335d060b3a51d6a144d23af4097ae6801473 --- vendor/sabre/vobject/lib/Property/FloatValue.php | 54 +++++++++++++++--------- 1 file changed, 35 insertions(+), 19 deletions(-) (limited to 'vendor/sabre/vobject/lib/Property/FloatValue.php') diff --git a/vendor/sabre/vobject/lib/Property/FloatValue.php b/vendor/sabre/vobject/lib/Property/FloatValue.php index 208d74516..15b119549 100644 --- a/vendor/sabre/vobject/lib/Property/FloatValue.php +++ b/vendor/sabre/vobject/lib/Property/FloatValue.php @@ -15,8 +15,8 @@ use Sabre\Xml; * @author Evert Pot (http://evertpot.com/) * @license http://sabre.io/license/ Modified BSD License */ -class FloatValue extends Property -{ +class FloatValue extends Property { + /** * In case this is a multi-value property. This string will be used as a * delimiter. @@ -32,14 +32,17 @@ class FloatValue extends Property * not yet done, but parameters are not included. * * @param string $val + * + * @return void */ - public function setRawMimeDirValue($val) - { + function setRawMimeDirValue($val) { + $val = explode($this->delimiter, $val); foreach ($val as &$item) { - $item = (float) $item; + $item = (float)$item; } $this->setParts($val); + } /** @@ -47,12 +50,13 @@ class FloatValue extends Property * * @return string */ - public function getRawMimeDirValue() - { + function getRawMimeDirValue() { + return implode( $this->delimiter, $this->getParts() ); + } /** @@ -63,9 +67,10 @@ class FloatValue extends Property * * @return string */ - public function getValueType() - { + function getValueType() { + return 'FLOAT'; + } /** @@ -75,19 +80,20 @@ class FloatValue extends Property * * @return array */ - public function getJsonValue() - { + function getJsonValue() { + $val = array_map('floatval', $this->getParts()); // Special-casing the GEO property. // // See: // http://tools.ietf.org/html/draft-ietf-jcardcal-jcal-04#section-3.4.1.2 - if ('GEO' === $this->name) { + if ($this->name === 'GEO') { return [$val]; } return $val; + } /** @@ -95,32 +101,42 @@ class FloatValue extends Property * object. * * @param array $value + * + * @return void */ - public function setXmlValue(array $value) - { + function setXmlValue(array $value) { + $value = array_map('floatval', $value); parent::setXmlValue($value); + } /** * This method serializes only the value of a property. This is used to * create xCard or xCal documents. * - * @param Xml\Writer $writer XML writer + * @param Xml\Writer $writer XML writer. + * + * @return void */ - protected function xmlSerializeValue(Xml\Writer $writer) - { + protected function xmlSerializeValue(Xml\Writer $writer) { + // Special-casing the GEO property. // // See: // http://tools.ietf.org/html/rfc6321#section-3.4.1.2 - if ('GEO' === $this->name) { + if ($this->name === 'GEO') { + $value = array_map('floatval', $this->getParts()); $writer->writeElement('latitude', $value[0]); $writer->writeElement('longitude', $value[1]); - } else { + + } + else { parent::xmlSerializeValue($writer); } + } + } -- cgit v1.2.3 From a60c2f38c689f254bd8bb8e7ea9af78bf21c1f84 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Thu, 25 Apr 2019 11:47:18 +0200 Subject: update sabre/vobject --- vendor/sabre/vobject/lib/Property/FloatValue.php | 54 +++++++++--------------- 1 file changed, 19 insertions(+), 35 deletions(-) (limited to 'vendor/sabre/vobject/lib/Property/FloatValue.php') diff --git a/vendor/sabre/vobject/lib/Property/FloatValue.php b/vendor/sabre/vobject/lib/Property/FloatValue.php index 15b119549..208d74516 100644 --- a/vendor/sabre/vobject/lib/Property/FloatValue.php +++ b/vendor/sabre/vobject/lib/Property/FloatValue.php @@ -15,8 +15,8 @@ use Sabre\Xml; * @author Evert Pot (http://evertpot.com/) * @license http://sabre.io/license/ Modified BSD License */ -class FloatValue extends Property { - +class FloatValue extends Property +{ /** * In case this is a multi-value property. This string will be used as a * delimiter. @@ -32,17 +32,14 @@ class FloatValue extends Property { * not yet done, but parameters are not included. * * @param string $val - * - * @return void */ - function setRawMimeDirValue($val) { - + public function setRawMimeDirValue($val) + { $val = explode($this->delimiter, $val); foreach ($val as &$item) { - $item = (float)$item; + $item = (float) $item; } $this->setParts($val); - } /** @@ -50,13 +47,12 @@ class FloatValue extends Property { * * @return string */ - function getRawMimeDirValue() { - + public function getRawMimeDirValue() + { return implode( $this->delimiter, $this->getParts() ); - } /** @@ -67,10 +63,9 @@ class FloatValue extends Property { * * @return string */ - function getValueType() { - + public function getValueType() + { return 'FLOAT'; - } /** @@ -80,20 +75,19 @@ class FloatValue extends Property { * * @return array */ - function getJsonValue() { - + public function getJsonValue() + { $val = array_map('floatval', $this->getParts()); // Special-casing the GEO property. // // See: // http://tools.ietf.org/html/draft-ietf-jcardcal-jcal-04#section-3.4.1.2 - if ($this->name === 'GEO') { + if ('GEO' === $this->name) { return [$val]; } return $val; - } /** @@ -101,42 +95,32 @@ class FloatValue extends Property { * object. * * @param array $value - * - * @return void */ - function setXmlValue(array $value) { - + public function setXmlValue(array $value) + { $value = array_map('floatval', $value); parent::setXmlValue($value); - } /** * This method serializes only the value of a property. This is used to * create xCard or xCal documents. * - * @param Xml\Writer $writer XML writer. - * - * @return void + * @param Xml\Writer $writer XML writer */ - protected function xmlSerializeValue(Xml\Writer $writer) { - + protected function xmlSerializeValue(Xml\Writer $writer) + { // Special-casing the GEO property. // // See: // http://tools.ietf.org/html/rfc6321#section-3.4.1.2 - if ($this->name === 'GEO') { - + if ('GEO' === $this->name) { $value = array_map('floatval', $this->getParts()); $writer->writeElement('latitude', $value[0]); $writer->writeElement('longitude', $value[1]); - - } - else { + } else { parent::xmlSerializeValue($writer); } - } - } -- cgit v1.2.3