aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/sabre/dav/lib/CalDAV/Xml/Property/ScheduleCalendarTransp.php
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/sabre/dav/lib/CalDAV/Xml/Property/ScheduleCalendarTransp.php')
-rw-r--r--vendor/sabre/dav/lib/CalDAV/Xml/Property/ScheduleCalendarTransp.php46
1 files changed, 22 insertions, 24 deletions
diff --git a/vendor/sabre/dav/lib/CalDAV/Xml/Property/ScheduleCalendarTransp.php b/vendor/sabre/dav/lib/CalDAV/Xml/Property/ScheduleCalendarTransp.php
index 10c20be55..780907169 100644
--- a/vendor/sabre/dav/lib/CalDAV/Xml/Property/ScheduleCalendarTransp.php
+++ b/vendor/sabre/dav/lib/CalDAV/Xml/Property/ScheduleCalendarTransp.php
@@ -1,5 +1,7 @@
<?php
+declare(strict_types=1);
+
namespace Sabre\CalDAV\Xml\Property;
use Sabre\CalDAV\Plugin;
@@ -24,41 +26,39 @@ use Sabre\Xml\Writer;
* @author Evert Pot (http://www.rooftopsolutions.nl/)
* @license http://sabre.io/license/ Modified BSD License
*/
-class ScheduleCalendarTransp implements Element {
-
+class ScheduleCalendarTransp implements Element
+{
const TRANSPARENT = 'transparent';
const OPAQUE = 'opaque';
/**
- * value
+ * value.
*
* @var string
*/
protected $value;
/**
- * Creates the property
+ * Creates the property.
*
* @param string $value
*/
- function __construct($value) {
-
- if ($value !== self::TRANSPARENT && $value !== self::OPAQUE) {
+ public function __construct($value)
+ {
+ if (self::TRANSPARENT !== $value && self::OPAQUE !== $value) {
throw new \InvalidArgumentException('The value must either be specified as "transparent" or "opaque"');
}
$this->value = $value;
-
}
/**
- * Returns the current value
+ * Returns the current value.
*
* @return string
*/
- function getValue() {
-
+ public function getValue()
+ {
return $this->value;
-
}
/**
@@ -78,19 +78,17 @@ class ScheduleCalendarTransp implements Element {
* If you are opening new elements, you must also close them again.
*
* @param Writer $writer
- * @return void
*/
- function xmlSerialize(Writer $writer) {
-
+ public function xmlSerialize(Writer $writer)
+ {
switch ($this->value) {
- case self::TRANSPARENT :
- $writer->writeElement('{' . Plugin::NS_CALDAV . '}transparent');
+ case self::TRANSPARENT:
+ $writer->writeElement('{'.Plugin::NS_CALDAV.'}transparent');
break;
- case self::OPAQUE :
- $writer->writeElement('{' . Plugin::NS_CALDAV . '}opaque');
+ case self::OPAQUE:
+ $writer->writeElement('{'.Plugin::NS_CALDAV.'}opaque');
break;
}
-
}
/**
@@ -112,10 +110,11 @@ class ScheduleCalendarTransp implements Element {
* the next element.
*
* @param Reader $reader
+ *
* @return mixed
*/
- static function xmlDeserialize(Reader $reader) {
-
+ public static function xmlDeserialize(Reader $reader)
+ {
$elems = Deserializer\enum($reader, Plugin::NS_CALDAV);
if (in_array('transparent', $elems)) {
@@ -123,8 +122,7 @@ class ScheduleCalendarTransp implements Element {
} else {
$value = self::OPAQUE;
}
- return new self($value);
+ return new self($value);
}
-
}