Completed
Branch develop (cec3a6)
by
unknown
19:26
created
htdocs/includes/sabre/sabre/dav/lib/DAV/Xml/Request/PropFind.php 1 patch
Indentation   +49 added lines, -49 removed lines patch added patch discarded remove patch
@@ -21,59 +21,59 @@
 block discarded – undo
21 21
  */
22 22
 class PropFind implements XmlDeserializable
23 23
 {
24
-    /**
25
-     * If this is set to true, this was an 'allprop' request.
26
-     *
27
-     * @var bool
28
-     */
29
-    public $allProp = false;
24
+	/**
25
+	 * If this is set to true, this was an 'allprop' request.
26
+	 *
27
+	 * @var bool
28
+	 */
29
+	public $allProp = false;
30 30
 
31
-    /**
32
-     * The property list.
33
-     *
34
-     * @var array|null
35
-     */
36
-    public $properties;
31
+	/**
32
+	 * The property list.
33
+	 *
34
+	 * @var array|null
35
+	 */
36
+	public $properties;
37 37
 
38
-    /**
39
-     * The deserialize method is called during xml parsing.
40
-     *
41
-     * This method is called statically, this is because in theory this method
42
-     * may be used as a type of constructor, or factory method.
43
-     *
44
-     * Often you want to return an instance of the current class, but you are
45
-     * free to return other data as well.
46
-     *
47
-     * You are responsible for advancing the reader to the next element. Not
48
-     * doing anything will result in a never-ending loop.
49
-     *
50
-     * If you just want to skip parsing for this element altogether, you can
51
-     * just call $reader->next();
52
-     *
53
-     * $reader->parseInnerTree() will parse the entire sub-tree, and advance to
54
-     * the next element.
55
-     *
56
-     * @return mixed
57
-     */
58
-    public static function xmlDeserialize(Reader $reader)
59
-    {
60
-        $self = new self();
38
+	/**
39
+	 * The deserialize method is called during xml parsing.
40
+	 *
41
+	 * This method is called statically, this is because in theory this method
42
+	 * may be used as a type of constructor, or factory method.
43
+	 *
44
+	 * Often you want to return an instance of the current class, but you are
45
+	 * free to return other data as well.
46
+	 *
47
+	 * You are responsible for advancing the reader to the next element. Not
48
+	 * doing anything will result in a never-ending loop.
49
+	 *
50
+	 * If you just want to skip parsing for this element altogether, you can
51
+	 * just call $reader->next();
52
+	 *
53
+	 * $reader->parseInnerTree() will parse the entire sub-tree, and advance to
54
+	 * the next element.
55
+	 *
56
+	 * @return mixed
57
+	 */
58
+	public static function xmlDeserialize(Reader $reader)
59
+	{
60
+		$self = new self();
61 61
 
62
-        $reader->pushContext();
63
-        $reader->elementMap['{DAV:}prop'] = 'Sabre\Xml\Element\Elements';
62
+		$reader->pushContext();
63
+		$reader->elementMap['{DAV:}prop'] = 'Sabre\Xml\Element\Elements';
64 64
 
65
-        foreach (KeyValue::xmlDeserialize($reader) as $k => $v) {
66
-            switch ($k) {
67
-                case '{DAV:}prop':
68
-                    $self->properties = $v;
69
-                    break;
70
-                case '{DAV:}allprop':
71
-                    $self->allProp = true;
72
-            }
73
-        }
65
+		foreach (KeyValue::xmlDeserialize($reader) as $k => $v) {
66
+			switch ($k) {
67
+				case '{DAV:}prop':
68
+					$self->properties = $v;
69
+					break;
70
+				case '{DAV:}allprop':
71
+					$self->allProp = true;
72
+			}
73
+		}
74 74
 
75
-        $reader->popContext();
75
+		$reader->popContext();
76 76
 
77
-        return $self;
78
-    }
77
+		return $self;
78
+	}
79 79
 }
Please login to merge, or discard this patch.
htdocs/includes/sabre/sabre/dav/lib/DAV/Xml/Response/MultiStatus.php 1 patch
Indentation   +101 added lines, -101 removed lines patch added patch discarded remove patch
@@ -23,114 +23,114 @@
 block discarded – undo
23 23
  */
24 24
 class MultiStatus implements Element
25 25
 {
26
-    /**
27
-     * The responses.
28
-     *
29
-     * @var \Sabre\DAV\Xml\Element\Response[]
30
-     */
31
-    protected $responses;
26
+	/**
27
+	 * The responses.
28
+	 *
29
+	 * @var \Sabre\DAV\Xml\Element\Response[]
30
+	 */
31
+	protected $responses;
32 32
 
33
-    /**
34
-     * A sync token (from RFC6578).
35
-     *
36
-     * @var string
37
-     */
38
-    protected $syncToken;
33
+	/**
34
+	 * A sync token (from RFC6578).
35
+	 *
36
+	 * @var string
37
+	 */
38
+	protected $syncToken;
39 39
 
40
-    /**
41
-     * Constructor.
42
-     *
43
-     * @param \Sabre\DAV\Xml\Element\Response[] $responses
44
-     * @param string                            $syncToken
45
-     */
46
-    public function __construct(array $responses, $syncToken = null)
47
-    {
48
-        $this->responses = $responses;
49
-        $this->syncToken = $syncToken;
50
-    }
40
+	/**
41
+	 * Constructor.
42
+	 *
43
+	 * @param \Sabre\DAV\Xml\Element\Response[] $responses
44
+	 * @param string                            $syncToken
45
+	 */
46
+	public function __construct(array $responses, $syncToken = null)
47
+	{
48
+		$this->responses = $responses;
49
+		$this->syncToken = $syncToken;
50
+	}
51 51
 
52
-    /**
53
-     * Returns the response list.
54
-     *
55
-     * @return \Sabre\DAV\Xml\Element\Response[]
56
-     */
57
-    public function getResponses()
58
-    {
59
-        return $this->responses;
60
-    }
52
+	/**
53
+	 * Returns the response list.
54
+	 *
55
+	 * @return \Sabre\DAV\Xml\Element\Response[]
56
+	 */
57
+	public function getResponses()
58
+	{
59
+		return $this->responses;
60
+	}
61 61
 
62
-    /**
63
-     * Returns the sync-token, if available.
64
-     *
65
-     * @return string|null
66
-     */
67
-    public function getSyncToken()
68
-    {
69
-        return $this->syncToken;
70
-    }
62
+	/**
63
+	 * Returns the sync-token, if available.
64
+	 *
65
+	 * @return string|null
66
+	 */
67
+	public function getSyncToken()
68
+	{
69
+		return $this->syncToken;
70
+	}
71 71
 
72
-    /**
73
-     * The serialize method is called during xml writing.
74
-     *
75
-     * It should use the $writer argument to encode this object into XML.
76
-     *
77
-     * Important note: it is not needed to create the parent element. The
78
-     * parent element is already created, and we only have to worry about
79
-     * attributes, child elements and text (if any).
80
-     *
81
-     * Important note 2: If you are writing any new elements, you are also
82
-     * responsible for closing them.
83
-     */
84
-    public function xmlSerialize(Writer $writer)
85
-    {
86
-        foreach ($this->getResponses() as $response) {
87
-            $writer->writeElement('{DAV:}response', $response);
88
-        }
89
-        if ($syncToken = $this->getSyncToken()) {
90
-            $writer->writeElement('{DAV:}sync-token', $syncToken);
91
-        }
92
-    }
72
+	/**
73
+	 * The serialize method is called during xml writing.
74
+	 *
75
+	 * It should use the $writer argument to encode this object into XML.
76
+	 *
77
+	 * Important note: it is not needed to create the parent element. The
78
+	 * parent element is already created, and we only have to worry about
79
+	 * attributes, child elements and text (if any).
80
+	 *
81
+	 * Important note 2: If you are writing any new elements, you are also
82
+	 * responsible for closing them.
83
+	 */
84
+	public function xmlSerialize(Writer $writer)
85
+	{
86
+		foreach ($this->getResponses() as $response) {
87
+			$writer->writeElement('{DAV:}response', $response);
88
+		}
89
+		if ($syncToken = $this->getSyncToken()) {
90
+			$writer->writeElement('{DAV:}sync-token', $syncToken);
91
+		}
92
+	}
93 93
 
94
-    /**
95
-     * The deserialize method is called during xml parsing.
96
-     *
97
-     * This method is called statically, this is because in theory this method
98
-     * may be used as a type of constructor, or factory method.
99
-     *
100
-     * Often you want to return an instance of the current class, but you are
101
-     * free to return other data as well.
102
-     *
103
-     * You are responsible for advancing the reader to the next element. Not
104
-     * doing anything will result in a never-ending loop.
105
-     *
106
-     * If you just want to skip parsing for this element altogether, you can
107
-     * just call $reader->next();
108
-     *
109
-     * $reader->parseInnerTree() will parse the entire sub-tree, and advance to
110
-     * the next element.
111
-     *
112
-     * @return mixed
113
-     */
114
-    public static function xmlDeserialize(Reader $reader)
115
-    {
116
-        $elementMap = $reader->elementMap;
117
-        $elementMap['{DAV:}prop'] = 'Sabre\\DAV\\Xml\\Element\\Prop';
118
-        $elements = $reader->parseInnerTree($elementMap);
94
+	/**
95
+	 * The deserialize method is called during xml parsing.
96
+	 *
97
+	 * This method is called statically, this is because in theory this method
98
+	 * may be used as a type of constructor, or factory method.
99
+	 *
100
+	 * Often you want to return an instance of the current class, but you are
101
+	 * free to return other data as well.
102
+	 *
103
+	 * You are responsible for advancing the reader to the next element. Not
104
+	 * doing anything will result in a never-ending loop.
105
+	 *
106
+	 * If you just want to skip parsing for this element altogether, you can
107
+	 * just call $reader->next();
108
+	 *
109
+	 * $reader->parseInnerTree() will parse the entire sub-tree, and advance to
110
+	 * the next element.
111
+	 *
112
+	 * @return mixed
113
+	 */
114
+	public static function xmlDeserialize(Reader $reader)
115
+	{
116
+		$elementMap = $reader->elementMap;
117
+		$elementMap['{DAV:}prop'] = 'Sabre\\DAV\\Xml\\Element\\Prop';
118
+		$elements = $reader->parseInnerTree($elementMap);
119 119
 
120
-        $responses = [];
121
-        $syncToken = null;
120
+		$responses = [];
121
+		$syncToken = null;
122 122
 
123
-        if ($elements) {
124
-            foreach ($elements as $elem) {
125
-                if ('{DAV:}response' === $elem['name']) {
126
-                    $responses[] = $elem['value'];
127
-                }
128
-                if ('{DAV:}sync-token' === $elem['name']) {
129
-                    $syncToken = $elem['value'];
130
-                }
131
-            }
132
-        }
123
+		if ($elements) {
124
+			foreach ($elements as $elem) {
125
+				if ('{DAV:}response' === $elem['name']) {
126
+					$responses[] = $elem['value'];
127
+				}
128
+				if ('{DAV:}sync-token' === $elem['name']) {
129
+					$syncToken = $elem['value'];
130
+				}
131
+			}
132
+		}
133 133
 
134
-        return new self($responses, $syncToken);
135
-    }
134
+		return new self($responses, $syncToken);
135
+	}
136 136
 }
Please login to merge, or discard this patch.
htdocs/includes/sabre/sabre/dav/lib/DAV/Xml/Property/Invite.php 1 patch
Indentation   +37 added lines, -37 removed lines patch added patch discarded remove patch
@@ -24,43 +24,43 @@
 block discarded – undo
24 24
  */
25 25
 class Invite implements XmlSerializable
26 26
 {
27
-    /**
28
-     * A list of sharees.
29
-     *
30
-     * @var Sharee[]
31
-     */
32
-    public $sharees = [];
27
+	/**
28
+	 * A list of sharees.
29
+	 *
30
+	 * @var Sharee[]
31
+	 */
32
+	public $sharees = [];
33 33
 
34
-    /**
35
-     * Creates the property.
36
-     *
37
-     * @param Sharee[] $sharees
38
-     */
39
-    public function __construct(array $sharees)
40
-    {
41
-        $this->sharees = $sharees;
42
-    }
34
+	/**
35
+	 * Creates the property.
36
+	 *
37
+	 * @param Sharee[] $sharees
38
+	 */
39
+	public function __construct(array $sharees)
40
+	{
41
+		$this->sharees = $sharees;
42
+	}
43 43
 
44
-    /**
45
-     * The xmlSerialize method is called during xml writing.
46
-     *
47
-     * Use the $writer argument to write its own xml serialization.
48
-     *
49
-     * An important note: do _not_ create a parent element. Any element
50
-     * implementing XmlSerializable should only ever write what's considered
51
-     * its 'inner xml'.
52
-     *
53
-     * The parent of the current element is responsible for writing a
54
-     * containing element.
55
-     *
56
-     * This allows serializers to be re-used for different element names.
57
-     *
58
-     * If you are opening new elements, you must also close them again.
59
-     */
60
-    public function xmlSerialize(Writer $writer)
61
-    {
62
-        foreach ($this->sharees as $sharee) {
63
-            $writer->writeElement('{DAV:}sharee', $sharee);
64
-        }
65
-    }
44
+	/**
45
+	 * The xmlSerialize method is called during xml writing.
46
+	 *
47
+	 * Use the $writer argument to write its own xml serialization.
48
+	 *
49
+	 * An important note: do _not_ create a parent element. Any element
50
+	 * implementing XmlSerializable should only ever write what's considered
51
+	 * its 'inner xml'.
52
+	 *
53
+	 * The parent of the current element is responsible for writing a
54
+	 * containing element.
55
+	 *
56
+	 * This allows serializers to be re-used for different element names.
57
+	 *
58
+	 * If you are opening new elements, you must also close them again.
59
+	 */
60
+	public function xmlSerialize(Writer $writer)
61
+	{
62
+		foreach ($this->sharees as $sharee) {
63
+			$writer->writeElement('{DAV:}sharee', $sharee);
64
+		}
65
+	}
66 66
 }
Please login to merge, or discard this patch.
htdocs/includes/sabre/sabre/dav/lib/DAV/Xml/Property/SupportedReportSet.php 1 patch
Indentation   +109 added lines, -109 removed lines patch added patch discarded remove patch
@@ -25,120 +25,120 @@
 block discarded – undo
25 25
  */
26 26
 class SupportedReportSet implements XmlSerializable, HtmlOutput
27 27
 {
28
-    /**
29
-     * List of reports.
30
-     *
31
-     * @var array
32
-     */
33
-    protected $reports = [];
28
+	/**
29
+	 * List of reports.
30
+	 *
31
+	 * @var array
32
+	 */
33
+	protected $reports = [];
34 34
 
35
-    /**
36
-     * Creates the property.
37
-     *
38
-     * Any reports passed in the constructor
39
-     * should be valid report-types in clark-notation.
40
-     *
41
-     * Either a string or an array of strings must be passed.
42
-     *
43
-     * @param string|string[] $reports
44
-     */
45
-    public function __construct($reports = null)
46
-    {
47
-        if (!is_null($reports)) {
48
-            $this->addReport($reports);
49
-        }
50
-    }
35
+	/**
36
+	 * Creates the property.
37
+	 *
38
+	 * Any reports passed in the constructor
39
+	 * should be valid report-types in clark-notation.
40
+	 *
41
+	 * Either a string or an array of strings must be passed.
42
+	 *
43
+	 * @param string|string[] $reports
44
+	 */
45
+	public function __construct($reports = null)
46
+	{
47
+		if (!is_null($reports)) {
48
+			$this->addReport($reports);
49
+		}
50
+	}
51 51
 
52
-    /**
53
-     * Adds a report to this property.
54
-     *
55
-     * The report must be a string in clark-notation.
56
-     * Multiple reports can be specified as an array.
57
-     *
58
-     * @param mixed $report
59
-     */
60
-    public function addReport($report)
61
-    {
62
-        $report = (array) $report;
52
+	/**
53
+	 * Adds a report to this property.
54
+	 *
55
+	 * The report must be a string in clark-notation.
56
+	 * Multiple reports can be specified as an array.
57
+	 *
58
+	 * @param mixed $report
59
+	 */
60
+	public function addReport($report)
61
+	{
62
+		$report = (array) $report;
63 63
 
64
-        foreach ($report as $r) {
65
-            if (!preg_match('/^{([^}]*)}(.*)$/', $r)) {
66
-                throw new DAV\Exception('Reportname must be in clark-notation');
67
-            }
68
-            $this->reports[] = $r;
69
-        }
70
-    }
64
+		foreach ($report as $r) {
65
+			if (!preg_match('/^{([^}]*)}(.*)$/', $r)) {
66
+				throw new DAV\Exception('Reportname must be in clark-notation');
67
+			}
68
+			$this->reports[] = $r;
69
+		}
70
+	}
71 71
 
72
-    /**
73
-     * Returns the list of supported reports.
74
-     *
75
-     * @return string[]
76
-     */
77
-    public function getValue()
78
-    {
79
-        return $this->reports;
80
-    }
72
+	/**
73
+	 * Returns the list of supported reports.
74
+	 *
75
+	 * @return string[]
76
+	 */
77
+	public function getValue()
78
+	{
79
+		return $this->reports;
80
+	}
81 81
 
82
-    /**
83
-     * Returns true or false if the property contains a specific report.
84
-     *
85
-     * @param string $reportName
86
-     *
87
-     * @return bool
88
-     */
89
-    public function has($reportName)
90
-    {
91
-        return in_array(
92
-            $reportName,
93
-            $this->reports
94
-        );
95
-    }
82
+	/**
83
+	 * Returns true or false if the property contains a specific report.
84
+	 *
85
+	 * @param string $reportName
86
+	 *
87
+	 * @return bool
88
+	 */
89
+	public function has($reportName)
90
+	{
91
+		return in_array(
92
+			$reportName,
93
+			$this->reports
94
+		);
95
+	}
96 96
 
97
-    /**
98
-     * The xmlSerialize method is called during xml writing.
99
-     *
100
-     * Use the $writer argument to write its own xml serialization.
101
-     *
102
-     * An important note: do _not_ create a parent element. Any element
103
-     * implementing XmlSerializable should only ever write what's considered
104
-     * its 'inner xml'.
105
-     *
106
-     * The parent of the current element is responsible for writing a
107
-     * containing element.
108
-     *
109
-     * This allows serializers to be re-used for different element names.
110
-     *
111
-     * If you are opening new elements, you must also close them again.
112
-     */
113
-    public function xmlSerialize(Writer $writer)
114
-    {
115
-        foreach ($this->getValue() as $val) {
116
-            $writer->startElement('{DAV:}supported-report');
117
-            $writer->startElement('{DAV:}report');
118
-            $writer->writeElement($val);
119
-            $writer->endElement();
120
-            $writer->endElement();
121
-        }
122
-    }
97
+	/**
98
+	 * The xmlSerialize method is called during xml writing.
99
+	 *
100
+	 * Use the $writer argument to write its own xml serialization.
101
+	 *
102
+	 * An important note: do _not_ create a parent element. Any element
103
+	 * implementing XmlSerializable should only ever write what's considered
104
+	 * its 'inner xml'.
105
+	 *
106
+	 * The parent of the current element is responsible for writing a
107
+	 * containing element.
108
+	 *
109
+	 * This allows serializers to be re-used for different element names.
110
+	 *
111
+	 * If you are opening new elements, you must also close them again.
112
+	 */
113
+	public function xmlSerialize(Writer $writer)
114
+	{
115
+		foreach ($this->getValue() as $val) {
116
+			$writer->startElement('{DAV:}supported-report');
117
+			$writer->startElement('{DAV:}report');
118
+			$writer->writeElement($val);
119
+			$writer->endElement();
120
+			$writer->endElement();
121
+		}
122
+	}
123 123
 
124
-    /**
125
-     * Generate html representation for this value.
126
-     *
127
-     * The html output is 100% trusted, and no effort is being made to sanitize
128
-     * it. It's up to the implementor to sanitize user provided values.
129
-     *
130
-     * The output must be in UTF-8.
131
-     *
132
-     * The baseUri parameter is a url to the root of the application, and can
133
-     * be used to construct local links.
134
-     *
135
-     * @return string
136
-     */
137
-    public function toHtml(HtmlOutputHelper $html)
138
-    {
139
-        return implode(
140
-            ', ',
141
-            array_map([$html, 'xmlName'], $this->getValue())
142
-        );
143
-    }
124
+	/**
125
+	 * Generate html representation for this value.
126
+	 *
127
+	 * The html output is 100% trusted, and no effort is being made to sanitize
128
+	 * it. It's up to the implementor to sanitize user provided values.
129
+	 *
130
+	 * The output must be in UTF-8.
131
+	 *
132
+	 * The baseUri parameter is a url to the root of the application, and can
133
+	 * be used to construct local links.
134
+	 *
135
+	 * @return string
136
+	 */
137
+	public function toHtml(HtmlOutputHelper $html)
138
+	{
139
+		return implode(
140
+			', ',
141
+			array_map([$html, 'xmlName'], $this->getValue())
142
+		);
143
+	}
144 144
 }
Please login to merge, or discard this patch.
htdocs/includes/sabre/sabre/dav/lib/DAV/Xml/Property/ShareAccess.php 1 patch
Indentation   +102 added lines, -102 removed lines patch added patch discarded remove patch
@@ -26,110 +26,110 @@
 block discarded – undo
26 26
  */
27 27
 class ShareAccess implements Element
28 28
 {
29
-    /**
30
-     * Either SHARED or SHAREDOWNER.
31
-     *
32
-     * @var int
33
-     */
34
-    protected $value;
29
+	/**
30
+	 * Either SHARED or SHAREDOWNER.
31
+	 *
32
+	 * @var int
33
+	 */
34
+	protected $value;
35 35
 
36
-    /**
37
-     * Creates the property.
38
-     *
39
-     * The constructor value must be one of the
40
-     * \Sabre\DAV\Sharing\Plugin::ACCESS_ constants.
41
-     *
42
-     * @param int $shareAccess
43
-     */
44
-    public function __construct($shareAccess)
45
-    {
46
-        $this->value = $shareAccess;
47
-    }
36
+	/**
37
+	 * Creates the property.
38
+	 *
39
+	 * The constructor value must be one of the
40
+	 * \Sabre\DAV\Sharing\Plugin::ACCESS_ constants.
41
+	 *
42
+	 * @param int $shareAccess
43
+	 */
44
+	public function __construct($shareAccess)
45
+	{
46
+		$this->value = $shareAccess;
47
+	}
48 48
 
49
-    /**
50
-     * Returns the current value.
51
-     *
52
-     * @return int
53
-     */
54
-    public function getValue()
55
-    {
56
-        return $this->value;
57
-    }
49
+	/**
50
+	 * Returns the current value.
51
+	 *
52
+	 * @return int
53
+	 */
54
+	public function getValue()
55
+	{
56
+		return $this->value;
57
+	}
58 58
 
59
-    /**
60
-     * The xmlSerialize method is called during xml writing.
61
-     *
62
-     * Use the $writer argument to write its own xml serialization.
63
-     *
64
-     * An important note: do _not_ create a parent element. Any element
65
-     * implementing XmlSerializable should only ever write what's considered
66
-     * its 'inner xml'.
67
-     *
68
-     * The parent of the current element is responsible for writing a
69
-     * containing element.
70
-     *
71
-     * This allows serializers to be re-used for different element names.
72
-     *
73
-     * If you are opening new elements, you must also close them again.
74
-     */
75
-    public function xmlSerialize(Writer $writer)
76
-    {
77
-        switch ($this->value) {
78
-            case SharingPlugin::ACCESS_NOTSHARED:
79
-                $writer->writeElement('{DAV:}not-shared');
80
-                break;
81
-            case SharingPlugin::ACCESS_SHAREDOWNER:
82
-                $writer->writeElement('{DAV:}shared-owner');
83
-                break;
84
-            case SharingPlugin::ACCESS_READ:
85
-                $writer->writeElement('{DAV:}read');
86
-                break;
87
-            case SharingPlugin::ACCESS_READWRITE:
88
-                $writer->writeElement('{DAV:}read-write');
89
-                break;
90
-            case SharingPlugin::ACCESS_NOACCESS:
91
-                $writer->writeElement('{DAV:}no-access');
92
-                break;
93
-        }
94
-    }
59
+	/**
60
+	 * The xmlSerialize method is called during xml writing.
61
+	 *
62
+	 * Use the $writer argument to write its own xml serialization.
63
+	 *
64
+	 * An important note: do _not_ create a parent element. Any element
65
+	 * implementing XmlSerializable should only ever write what's considered
66
+	 * its 'inner xml'.
67
+	 *
68
+	 * The parent of the current element is responsible for writing a
69
+	 * containing element.
70
+	 *
71
+	 * This allows serializers to be re-used for different element names.
72
+	 *
73
+	 * If you are opening new elements, you must also close them again.
74
+	 */
75
+	public function xmlSerialize(Writer $writer)
76
+	{
77
+		switch ($this->value) {
78
+			case SharingPlugin::ACCESS_NOTSHARED:
79
+				$writer->writeElement('{DAV:}not-shared');
80
+				break;
81
+			case SharingPlugin::ACCESS_SHAREDOWNER:
82
+				$writer->writeElement('{DAV:}shared-owner');
83
+				break;
84
+			case SharingPlugin::ACCESS_READ:
85
+				$writer->writeElement('{DAV:}read');
86
+				break;
87
+			case SharingPlugin::ACCESS_READWRITE:
88
+				$writer->writeElement('{DAV:}read-write');
89
+				break;
90
+			case SharingPlugin::ACCESS_NOACCESS:
91
+				$writer->writeElement('{DAV:}no-access');
92
+				break;
93
+		}
94
+	}
95 95
 
96
-    /**
97
-     * The deserialize method is called during xml parsing.
98
-     *
99
-     * This method is called statically, this is because in theory this method
100
-     * may be used as a type of constructor, or factory method.
101
-     *
102
-     * Often you want to return an instance of the current class, but you are
103
-     * free to return other data as well.
104
-     *
105
-     * You are responsible for advancing the reader to the next element. Not
106
-     * doing anything will result in a never-ending loop.
107
-     *
108
-     * If you just want to skip parsing for this element altogether, you can
109
-     * just call $reader->next();
110
-     *
111
-     * $reader->parseInnerTree() will parse the entire sub-tree, and advance to
112
-     * the next element.
113
-     *
114
-     * @return mixed
115
-     */
116
-    public static function xmlDeserialize(Reader $reader)
117
-    {
118
-        $elems = $reader->parseInnerTree();
119
-        foreach ($elems as $elem) {
120
-            switch ($elem['name']) {
121
-                case '{DAV:}not-shared':
122
-                    return new self(SharingPlugin::ACCESS_NOTSHARED);
123
-                case '{DAV:}shared-owner':
124
-                    return new self(SharingPlugin::ACCESS_SHAREDOWNER);
125
-                case '{DAV:}read':
126
-                    return new self(SharingPlugin::ACCESS_READ);
127
-                case '{DAV:}read-write':
128
-                    return new self(SharingPlugin::ACCESS_READWRITE);
129
-                case '{DAV:}no-access':
130
-                    return new self(SharingPlugin::ACCESS_NOACCESS);
131
-            }
132
-        }
133
-        throw new BadRequest('Invalid value for {DAV:}share-access element');
134
-    }
96
+	/**
97
+	 * The deserialize method is called during xml parsing.
98
+	 *
99
+	 * This method is called statically, this is because in theory this method
100
+	 * may be used as a type of constructor, or factory method.
101
+	 *
102
+	 * Often you want to return an instance of the current class, but you are
103
+	 * free to return other data as well.
104
+	 *
105
+	 * You are responsible for advancing the reader to the next element. Not
106
+	 * doing anything will result in a never-ending loop.
107
+	 *
108
+	 * If you just want to skip parsing for this element altogether, you can
109
+	 * just call $reader->next();
110
+	 *
111
+	 * $reader->parseInnerTree() will parse the entire sub-tree, and advance to
112
+	 * the next element.
113
+	 *
114
+	 * @return mixed
115
+	 */
116
+	public static function xmlDeserialize(Reader $reader)
117
+	{
118
+		$elems = $reader->parseInnerTree();
119
+		foreach ($elems as $elem) {
120
+			switch ($elem['name']) {
121
+				case '{DAV:}not-shared':
122
+					return new self(SharingPlugin::ACCESS_NOTSHARED);
123
+				case '{DAV:}shared-owner':
124
+					return new self(SharingPlugin::ACCESS_SHAREDOWNER);
125
+				case '{DAV:}read':
126
+					return new self(SharingPlugin::ACCESS_READ);
127
+				case '{DAV:}read-write':
128
+					return new self(SharingPlugin::ACCESS_READWRITE);
129
+				case '{DAV:}no-access':
130
+					return new self(SharingPlugin::ACCESS_NOACCESS);
131
+			}
132
+		}
133
+		throw new BadRequest('Invalid value for {DAV:}share-access element');
134
+	}
135 135
 }
Please login to merge, or discard this patch.
htdocs/includes/sabre/sabre/dav/lib/DAV/Xml/Property/LocalHref.php 1 patch
Indentation   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -26,23 +26,23 @@
 block discarded – undo
26 26
  */
27 27
 class LocalHref extends Href
28 28
 {
29
-    /**
30
-     * Constructor.
31
-     *
32
-     * You must either pass a string for a single href, or an array of hrefs.
33
-     *
34
-     * If auto-prefix is set to false, the hrefs will be treated as absolute
35
-     * and not relative to the servers base uri.
36
-     *
37
-     * @param string|string[] $hrefs
38
-     */
39
-    public function __construct($hrefs)
40
-    {
41
-        parent::__construct(array_map(
42
-            function ($href) {
43
-                return \Sabre\HTTP\encodePath($href);
44
-            },
45
-            (array) $hrefs
46
-        ));
47
-    }
29
+	/**
30
+	 * Constructor.
31
+	 *
32
+	 * You must either pass a string for a single href, or an array of hrefs.
33
+	 *
34
+	 * If auto-prefix is set to false, the hrefs will be treated as absolute
35
+	 * and not relative to the servers base uri.
36
+	 *
37
+	 * @param string|string[] $hrefs
38
+	 */
39
+	public function __construct($hrefs)
40
+	{
41
+		parent::__construct(array_map(
42
+			function ($href) {
43
+				return \Sabre\HTTP\encodePath($href);
44
+			},
45
+			(array) $hrefs
46
+		));
47
+	}
48 48
 }
Please login to merge, or discard this patch.
htdocs/includes/sabre/sabre/dav/lib/DAV/Xml/Property/LockDiscovery.php 1 patch
Indentation   +69 added lines, -69 removed lines patch added patch discarded remove patch
@@ -24,82 +24,82 @@
 block discarded – undo
24 24
  */
25 25
 class LockDiscovery implements XmlSerializable
26 26
 {
27
-    /**
28
-     * locks.
29
-     *
30
-     * @var LockInfo[]
31
-     */
32
-    public $locks;
27
+	/**
28
+	 * locks.
29
+	 *
30
+	 * @var LockInfo[]
31
+	 */
32
+	public $locks;
33 33
 
34
-    /**
35
-     * Hides the {DAV:}lockroot element from the response.
36
-     *
37
-     * It was reported that showing the lockroot in the response can break
38
-     * Office 2000 compatibility.
39
-     *
40
-     * @var bool
41
-     */
42
-    public static $hideLockRoot = false;
34
+	/**
35
+	 * Hides the {DAV:}lockroot element from the response.
36
+	 *
37
+	 * It was reported that showing the lockroot in the response can break
38
+	 * Office 2000 compatibility.
39
+	 *
40
+	 * @var bool
41
+	 */
42
+	public static $hideLockRoot = false;
43 43
 
44
-    /**
45
-     * __construct.
46
-     *
47
-     * @param LockInfo[] $locks
48
-     */
49
-    public function __construct($locks)
50
-    {
51
-        $this->locks = $locks;
52
-    }
44
+	/**
45
+	 * __construct.
46
+	 *
47
+	 * @param LockInfo[] $locks
48
+	 */
49
+	public function __construct($locks)
50
+	{
51
+		$this->locks = $locks;
52
+	}
53 53
 
54
-    /**
55
-     * The serialize method is called during xml writing.
56
-     *
57
-     * It should use the $writer argument to encode this object into XML.
58
-     *
59
-     * Important note: it is not needed to create the parent element. The
60
-     * parent element is already created, and we only have to worry about
61
-     * attributes, child elements and text (if any).
62
-     *
63
-     * Important note 2: If you are writing any new elements, you are also
64
-     * responsible for closing them.
65
-     */
66
-    public function xmlSerialize(Writer $writer)
67
-    {
68
-        foreach ($this->locks as $lock) {
69
-            $writer->startElement('{DAV:}activelock');
54
+	/**
55
+	 * The serialize method is called during xml writing.
56
+	 *
57
+	 * It should use the $writer argument to encode this object into XML.
58
+	 *
59
+	 * Important note: it is not needed to create the parent element. The
60
+	 * parent element is already created, and we only have to worry about
61
+	 * attributes, child elements and text (if any).
62
+	 *
63
+	 * Important note 2: If you are writing any new elements, you are also
64
+	 * responsible for closing them.
65
+	 */
66
+	public function xmlSerialize(Writer $writer)
67
+	{
68
+		foreach ($this->locks as $lock) {
69
+			$writer->startElement('{DAV:}activelock');
70 70
 
71
-            $writer->startElement('{DAV:}lockscope');
72
-            if (LockInfo::SHARED === $lock->scope) {
73
-                $writer->writeElement('{DAV:}shared');
74
-            } else {
75
-                $writer->writeElement('{DAV:}exclusive');
76
-            }
71
+			$writer->startElement('{DAV:}lockscope');
72
+			if (LockInfo::SHARED === $lock->scope) {
73
+				$writer->writeElement('{DAV:}shared');
74
+			} else {
75
+				$writer->writeElement('{DAV:}exclusive');
76
+			}
77 77
 
78
-            $writer->endElement(); // {DAV:}lockscope
78
+			$writer->endElement(); // {DAV:}lockscope
79 79
 
80
-            $writer->startElement('{DAV:}locktype');
81
-            $writer->writeElement('{DAV:}write');
82
-            $writer->endElement(); // {DAV:}locktype
80
+			$writer->startElement('{DAV:}locktype');
81
+			$writer->writeElement('{DAV:}write');
82
+			$writer->endElement(); // {DAV:}locktype
83 83
 
84
-            if (!self::$hideLockRoot) {
85
-                $writer->startElement('{DAV:}lockroot');
86
-                $writer->writeElement('{DAV:}href', $writer->contextUri.$lock->uri);
87
-                $writer->endElement(); // {DAV:}lockroot
88
-            }
89
-            $writer->writeElement('{DAV:}depth', (DAV\Server::DEPTH_INFINITY == $lock->depth ? 'infinity' : $lock->depth));
90
-            $writer->writeElement('{DAV:}timeout', (LockInfo::TIMEOUT_INFINITE === $lock->timeout ? 'Infinite' : 'Second-'.$lock->timeout));
84
+			if (!self::$hideLockRoot) {
85
+				$writer->startElement('{DAV:}lockroot');
86
+				$writer->writeElement('{DAV:}href', $writer->contextUri.$lock->uri);
87
+				$writer->endElement(); // {DAV:}lockroot
88
+			}
89
+			$writer->writeElement('{DAV:}depth', (DAV\Server::DEPTH_INFINITY == $lock->depth ? 'infinity' : $lock->depth));
90
+			$writer->writeElement('{DAV:}timeout', (LockInfo::TIMEOUT_INFINITE === $lock->timeout ? 'Infinite' : 'Second-'.$lock->timeout));
91 91
 
92
-            // optional according to https://tools.ietf.org/html/rfc4918#section-6.5
93
-            if (null !== $lock->token && '' !== $lock->token) {
94
-                $writer->startElement('{DAV:}locktoken');
95
-                $writer->writeElement('{DAV:}href', 'opaquelocktoken:'.$lock->token);
96
-                $writer->endElement(); // {DAV:}locktoken
97
-            }
92
+			// optional according to https://tools.ietf.org/html/rfc4918#section-6.5
93
+			if (null !== $lock->token && '' !== $lock->token) {
94
+				$writer->startElement('{DAV:}locktoken');
95
+				$writer->writeElement('{DAV:}href', 'opaquelocktoken:'.$lock->token);
96
+				$writer->endElement(); // {DAV:}locktoken
97
+			}
98 98
 
99
-            if ($lock->owner) {
100
-                $writer->writeElement('{DAV:}owner', new XmlFragment($lock->owner));
101
-            }
102
-            $writer->endElement(); // {DAV:}activelock
103
-        }
104
-    }
99
+			if ($lock->owner) {
100
+				$writer->writeElement('{DAV:}owner', new XmlFragment($lock->owner));
101
+			}
102
+			$writer->endElement(); // {DAV:}activelock
103
+		}
104
+	}
105 105
 }
Please login to merge, or discard this patch.
htdocs/includes/sabre/sabre/dav/lib/DAV/Xml/Property/SupportedMethodSet.php 1 patch
Indentation   +82 added lines, -82 removed lines patch added patch discarded remove patch
@@ -24,91 +24,91 @@
 block discarded – undo
24 24
  */
25 25
 class SupportedMethodSet implements XmlSerializable, HtmlOutput
26 26
 {
27
-    /**
28
-     * List of methods.
29
-     *
30
-     * @var string[]
31
-     */
32
-    protected $methods = [];
27
+	/**
28
+	 * List of methods.
29
+	 *
30
+	 * @var string[]
31
+	 */
32
+	protected $methods = [];
33 33
 
34
-    /**
35
-     * Creates the property.
36
-     *
37
-     * @param string[] $methods
38
-     */
39
-    public function __construct(array $methods)
40
-    {
41
-        $this->methods = $methods;
42
-    }
34
+	/**
35
+	 * Creates the property.
36
+	 *
37
+	 * @param string[] $methods
38
+	 */
39
+	public function __construct(array $methods)
40
+	{
41
+		$this->methods = $methods;
42
+	}
43 43
 
44
-    /**
45
-     * Returns the list of supported http methods.
46
-     *
47
-     * @return string[]
48
-     */
49
-    public function getValue()
50
-    {
51
-        return $this->methods;
52
-    }
44
+	/**
45
+	 * Returns the list of supported http methods.
46
+	 *
47
+	 * @return string[]
48
+	 */
49
+	public function getValue()
50
+	{
51
+		return $this->methods;
52
+	}
53 53
 
54
-    /**
55
-     * Returns true or false if the property contains a specific method.
56
-     *
57
-     * @param string $methodName
58
-     *
59
-     * @return bool
60
-     */
61
-    public function has($methodName)
62
-    {
63
-        return in_array(
64
-            $methodName,
65
-            $this->methods
66
-        );
67
-    }
54
+	/**
55
+	 * Returns true or false if the property contains a specific method.
56
+	 *
57
+	 * @param string $methodName
58
+	 *
59
+	 * @return bool
60
+	 */
61
+	public function has($methodName)
62
+	{
63
+		return in_array(
64
+			$methodName,
65
+			$this->methods
66
+		);
67
+	}
68 68
 
69
-    /**
70
-     * The xmlSerialize method is called during xml writing.
71
-     *
72
-     * Use the $writer argument to write its own xml serialization.
73
-     *
74
-     * An important note: do _not_ create a parent element. Any element
75
-     * implementing XmlSerializable should only ever write what's considered
76
-     * its 'inner xml'.
77
-     *
78
-     * The parent of the current element is responsible for writing a
79
-     * containing element.
80
-     *
81
-     * This allows serializers to be re-used for different element names.
82
-     *
83
-     * If you are opening new elements, you must also close them again.
84
-     */
85
-    public function xmlSerialize(Writer $writer)
86
-    {
87
-        foreach ($this->getValue() as $val) {
88
-            $writer->startElement('{DAV:}supported-method');
89
-            $writer->writeAttribute('name', $val);
90
-            $writer->endElement();
91
-        }
92
-    }
69
+	/**
70
+	 * The xmlSerialize method is called during xml writing.
71
+	 *
72
+	 * Use the $writer argument to write its own xml serialization.
73
+	 *
74
+	 * An important note: do _not_ create a parent element. Any element
75
+	 * implementing XmlSerializable should only ever write what's considered
76
+	 * its 'inner xml'.
77
+	 *
78
+	 * The parent of the current element is responsible for writing a
79
+	 * containing element.
80
+	 *
81
+	 * This allows serializers to be re-used for different element names.
82
+	 *
83
+	 * If you are opening new elements, you must also close them again.
84
+	 */
85
+	public function xmlSerialize(Writer $writer)
86
+	{
87
+		foreach ($this->getValue() as $val) {
88
+			$writer->startElement('{DAV:}supported-method');
89
+			$writer->writeAttribute('name', $val);
90
+			$writer->endElement();
91
+		}
92
+	}
93 93
 
94
-    /**
95
-     * Generate html representation for this value.
96
-     *
97
-     * The html output is 100% trusted, and no effort is being made to sanitize
98
-     * it. It's up to the implementor to sanitize user provided values.
99
-     *
100
-     * The output must be in UTF-8.
101
-     *
102
-     * The baseUri parameter is a url to the root of the application, and can
103
-     * be used to construct local links.
104
-     *
105
-     * @return string
106
-     */
107
-    public function toHtml(HtmlOutputHelper $html)
108
-    {
109
-        return implode(
110
-            ', ',
111
-            array_map([$html, 'h'], $this->getValue())
112
-        );
113
-    }
94
+	/**
95
+	 * Generate html representation for this value.
96
+	 *
97
+	 * The html output is 100% trusted, and no effort is being made to sanitize
98
+	 * it. It's up to the implementor to sanitize user provided values.
99
+	 *
100
+	 * The output must be in UTF-8.
101
+	 *
102
+	 * The baseUri parameter is a url to the root of the application, and can
103
+	 * be used to construct local links.
104
+	 *
105
+	 * @return string
106
+	 */
107
+	public function toHtml(HtmlOutputHelper $html)
108
+	{
109
+		return implode(
110
+			', ',
111
+			array_map([$html, 'h'], $this->getValue())
112
+		);
113
+	}
114 114
 }
Please login to merge, or discard this patch.
htdocs/includes/sabre/sabre/dav/lib/DAV/Xml/Property/ResourceType.php 1 patch
Indentation   +90 added lines, -90 removed lines patch added patch discarded remove patch
@@ -22,99 +22,99 @@
 block discarded – undo
22 22
  */
23 23
 class ResourceType extends Element\Elements implements HtmlOutput
24 24
 {
25
-    /**
26
-     * Constructor.
27
-     *
28
-     * You can either pass null (for no resourcetype), a string (for a single
29
-     * resourcetype) or an array (for multiple).
30
-     *
31
-     * The resourcetype must be specified in clark-notation
32
-     *
33
-     * @param array|string|null $resourceTypes
34
-     */
35
-    public function __construct($resourceTypes = null)
36
-    {
37
-        parent::__construct((array) $resourceTypes);
38
-    }
25
+	/**
26
+	 * Constructor.
27
+	 *
28
+	 * You can either pass null (for no resourcetype), a string (for a single
29
+	 * resourcetype) or an array (for multiple).
30
+	 *
31
+	 * The resourcetype must be specified in clark-notation
32
+	 *
33
+	 * @param array|string|null $resourceTypes
34
+	 */
35
+	public function __construct($resourceTypes = null)
36
+	{
37
+		parent::__construct((array) $resourceTypes);
38
+	}
39 39
 
40
-    /**
41
-     * Returns the values in clark-notation.
42
-     *
43
-     * For example array('{DAV:}collection')
44
-     *
45
-     * @return array
46
-     */
47
-    public function getValue()
48
-    {
49
-        return $this->value;
50
-    }
40
+	/**
41
+	 * Returns the values in clark-notation.
42
+	 *
43
+	 * For example array('{DAV:}collection')
44
+	 *
45
+	 * @return array
46
+	 */
47
+	public function getValue()
48
+	{
49
+		return $this->value;
50
+	}
51 51
 
52
-    /**
53
-     * Checks if the principal contains a certain value.
54
-     *
55
-     * @param string $type
56
-     *
57
-     * @return bool
58
-     */
59
-    public function is($type)
60
-    {
61
-        return in_array($type, $this->value);
62
-    }
52
+	/**
53
+	 * Checks if the principal contains a certain value.
54
+	 *
55
+	 * @param string $type
56
+	 *
57
+	 * @return bool
58
+	 */
59
+	public function is($type)
60
+	{
61
+		return in_array($type, $this->value);
62
+	}
63 63
 
64
-    /**
65
-     * Adds a resourcetype value to this property.
66
-     *
67
-     * @param string $type
68
-     */
69
-    public function add($type)
70
-    {
71
-        $this->value[] = $type;
72
-        $this->value = array_unique($this->value);
73
-    }
64
+	/**
65
+	 * Adds a resourcetype value to this property.
66
+	 *
67
+	 * @param string $type
68
+	 */
69
+	public function add($type)
70
+	{
71
+		$this->value[] = $type;
72
+		$this->value = array_unique($this->value);
73
+	}
74 74
 
75
-    /**
76
-     * The deserialize method is called during xml parsing.
77
-     *
78
-     * This method is called statically, this is because in theory this method
79
-     * may be used as a type of constructor, or factory method.
80
-     *
81
-     * Often you want to return an instance of the current class, but you are
82
-     * free to return other data as well.
83
-     *
84
-     * Important note 2: You are responsible for advancing the reader to the
85
-     * next element. Not doing anything will result in a never-ending loop.
86
-     *
87
-     * If you just want to skip parsing for this element altogether, you can
88
-     * just call $reader->next();
89
-     *
90
-     * $reader->parseInnerTree() will parse the entire sub-tree, and advance to
91
-     * the next element.
92
-     *
93
-     * @return mixed
94
-     */
95
-    public static function xmlDeserialize(Reader $reader)
96
-    {
97
-        return new self(parent::xmlDeserialize($reader));
98
-    }
75
+	/**
76
+	 * The deserialize method is called during xml parsing.
77
+	 *
78
+	 * This method is called statically, this is because in theory this method
79
+	 * may be used as a type of constructor, or factory method.
80
+	 *
81
+	 * Often you want to return an instance of the current class, but you are
82
+	 * free to return other data as well.
83
+	 *
84
+	 * Important note 2: You are responsible for advancing the reader to the
85
+	 * next element. Not doing anything will result in a never-ending loop.
86
+	 *
87
+	 * If you just want to skip parsing for this element altogether, you can
88
+	 * just call $reader->next();
89
+	 *
90
+	 * $reader->parseInnerTree() will parse the entire sub-tree, and advance to
91
+	 * the next element.
92
+	 *
93
+	 * @return mixed
94
+	 */
95
+	public static function xmlDeserialize(Reader $reader)
96
+	{
97
+		return new self(parent::xmlDeserialize($reader));
98
+	}
99 99
 
100
-    /**
101
-     * Generate html representation for this value.
102
-     *
103
-     * The html output is 100% trusted, and no effort is being made to sanitize
104
-     * it. It's up to the implementor to sanitize user provided values.
105
-     *
106
-     * The output must be in UTF-8.
107
-     *
108
-     * The baseUri parameter is a url to the root of the application, and can
109
-     * be used to construct local links.
110
-     *
111
-     * @return string
112
-     */
113
-    public function toHtml(HtmlOutputHelper $html)
114
-    {
115
-        return implode(
116
-            ', ',
117
-            array_map([$html, 'xmlName'], $this->getValue())
118
-        );
119
-    }
100
+	/**
101
+	 * Generate html representation for this value.
102
+	 *
103
+	 * The html output is 100% trusted, and no effort is being made to sanitize
104
+	 * it. It's up to the implementor to sanitize user provided values.
105
+	 *
106
+	 * The output must be in UTF-8.
107
+	 *
108
+	 * The baseUri parameter is a url to the root of the application, and can
109
+	 * be used to construct local links.
110
+	 *
111
+	 * @return string
112
+	 */
113
+	public function toHtml(HtmlOutputHelper $html)
114
+	{
115
+		return implode(
116
+			', ',
117
+			array_map([$html, 'xmlName'], $this->getValue())
118
+		);
119
+	}
120 120
 }
Please login to merge, or discard this patch.