aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/sabre/dav/lib/DAV/Xml/Property/SupportedMethodSet.php
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/sabre/dav/lib/DAV/Xml/Property/SupportedMethodSet.php')
-rw-r--r--vendor/sabre/dav/lib/DAV/Xml/Property/SupportedMethodSet.php39
1 files changed, 18 insertions, 21 deletions
diff --git a/vendor/sabre/dav/lib/DAV/Xml/Property/SupportedMethodSet.php b/vendor/sabre/dav/lib/DAV/Xml/Property/SupportedMethodSet.php
index 1a3878ef7..06ab28c94 100644
--- a/vendor/sabre/dav/lib/DAV/Xml/Property/SupportedMethodSet.php
+++ b/vendor/sabre/dav/lib/DAV/Xml/Property/SupportedMethodSet.php
@@ -1,5 +1,7 @@
<?php
+declare(strict_types=1);
+
namespace Sabre\DAV\Xml\Property;
use Sabre\DAV\Browser\HtmlOutput;
@@ -20,24 +22,23 @@ use Sabre\Xml\XmlSerializable;
* @author Evert Pot (http://evertpot.com/)
* @license http://sabre.io/license/ Modified BSD License
*/
-class SupportedMethodSet implements XmlSerializable, HtmlOutput {
-
+class SupportedMethodSet implements XmlSerializable, HtmlOutput
+{
/**
- * List of methods
+ * List of methods.
*
* @var string[]
*/
protected $methods = [];
/**
- * Creates the property
+ * Creates the property.
*
* @param string[] $methods
*/
- function __construct(array $methods) {
-
+ public function __construct(array $methods)
+ {
$this->methods = $methods;
-
}
/**
@@ -45,25 +46,24 @@ class SupportedMethodSet implements XmlSerializable, HtmlOutput {
*
* @return string[]
*/
- function getValue() {
-
+ public function getValue()
+ {
return $this->methods;
-
}
/**
* Returns true or false if the property contains a specific method.
*
* @param string $methodName
+ *
* @return bool
*/
- function has($methodName) {
-
+ public function has($methodName)
+ {
return in_array(
$methodName,
$this->methods
);
-
}
/**
@@ -83,16 +83,14 @@ class SupportedMethodSet implements XmlSerializable, HtmlOutput {
* 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)
+ {
foreach ($this->getValue() as $val) {
$writer->startElement('{DAV:}supported-method');
$writer->writeAttribute('name', $val);
$writer->endElement();
}
-
}
/**
@@ -107,15 +105,14 @@ class SupportedMethodSet implements XmlSerializable, HtmlOutput {
* be used to construct local links.
*
* @param HtmlOutputHelper $html
+ *
* @return string
*/
- function toHtml(HtmlOutputHelper $html) {
-
+ public function toHtml(HtmlOutputHelper $html)
+ {
return implode(
', ',
array_map([$html, 'h'], $this->getValue())
);
-
}
-
}