@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | |
75 | 75 | $server->on('report', [$this, 'report']); |
76 | 76 | |
77 | - $server->xml->elementMap['{' . self::NS_Nextcloud . '}calendar-search'] = |
|
77 | + $server->xml->elementMap['{'.self::NS_Nextcloud.'}calendar-search'] = |
|
78 | 78 | 'OCA\\DAV\\CalDAV\\Search\\Xml\\Request\\CalendarSearchReport'; |
79 | 79 | } |
80 | 80 | |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | */ |
89 | 89 | function report($reportName, $report, $path) { |
90 | 90 | switch ($reportName) { |
91 | - case '{' . self::NS_Nextcloud . '}calendar-search' : |
|
91 | + case '{'.self::NS_Nextcloud.'}calendar-search' : |
|
92 | 92 | $this->server->transactionType = 'report-nc-calendar-search'; |
93 | 93 | $this->calendarSearch($report); |
94 | 94 | return false; |
@@ -110,7 +110,7 @@ discard block |
||
110 | 110 | |
111 | 111 | $reports = []; |
112 | 112 | if ($node instanceof CalendarHome) { |
113 | - $reports[] = '{' . self::NS_Nextcloud . '}calendar-search'; |
|
113 | + $reports[] = '{'.self::NS_Nextcloud.'}calendar-search'; |
|
114 | 114 | } |
115 | 115 | |
116 | 116 | return $reports; |
@@ -140,7 +140,7 @@ discard block |
||
140 | 140 | |
141 | 141 | foreach ($nodePaths as $path) { |
142 | 142 | list($properties) = $this->server->getPropertiesForPath( |
143 | - $this->server->getRequestUri() . '/' . $path, |
|
143 | + $this->server->getRequestUri().'/'.$path, |
|
144 | 144 | $report->properties); |
145 | 145 | $result[] = $properties; |
146 | 146 | } |
@@ -39,7 +39,7 @@ |
||
39 | 39 | $reader->parseInnerTree(); |
40 | 40 | |
41 | 41 | if (!is_string($componentName)) { |
42 | - throw new BadRequest('The {' . SearchPlugin::NS_Nextcloud . '}comp-filter requires a valid name attribute'); |
|
42 | + throw new BadRequest('The {'.SearchPlugin::NS_Nextcloud.'}comp-filter requires a valid name attribute'); |
|
43 | 43 | } |
44 | 44 | |
45 | 45 | return $componentName; |
@@ -35,7 +35,7 @@ |
||
35 | 35 | static function xmlDeserialize(Reader $reader) { |
36 | 36 | $value = $reader->parseInnerTree(); |
37 | 37 | if (!is_int($value) && !is_string($value)) { |
38 | - throw new BadRequest('The {' . SearchPlugin::NS_Nextcloud . '}limit has illegal value'); |
|
38 | + throw new BadRequest('The {'.SearchPlugin::NS_Nextcloud.'}limit has illegal value'); |
|
39 | 39 | } |
40 | 40 | |
41 | 41 | return intval($value); |
@@ -35,7 +35,7 @@ |
||
35 | 35 | static function xmlDeserialize(Reader $reader) { |
36 | 36 | $value = $reader->parseInnerTree(); |
37 | 37 | if (!is_string($value)) { |
38 | - throw new BadRequest('The {' . SearchPlugin::NS_Nextcloud . '}search-term has illegal value'); |
|
38 | + throw new BadRequest('The {'.SearchPlugin::NS_Nextcloud.'}search-term has illegal value'); |
|
39 | 39 | } |
40 | 40 | |
41 | 41 | return $value; |
@@ -35,7 +35,7 @@ |
||
35 | 35 | static function xmlDeserialize(Reader $reader) { |
36 | 36 | $value = $reader->parseInnerTree(); |
37 | 37 | if (!is_int($value) && !is_string($value)) { |
38 | - throw new BadRequest('The {' . SearchPlugin::NS_Nextcloud . '}offset has illegal value'); |
|
38 | + throw new BadRequest('The {'.SearchPlugin::NS_Nextcloud.'}offset has illegal value'); |
|
39 | 39 | } |
40 | 40 | |
41 | 41 | return intval($value); |
@@ -39,7 +39,7 @@ |
||
39 | 39 | $reader->parseInnerTree(); |
40 | 40 | |
41 | 41 | if (!is_string($componentName)) { |
42 | - throw new BadRequest('The {' . SearchPlugin::NS_Nextcloud . '}prop-filter requires a valid name attribute'); |
|
42 | + throw new BadRequest('The {'.SearchPlugin::NS_Nextcloud.'}prop-filter requires a valid name attribute'); |
|
43 | 43 | } |
44 | 44 | |
45 | 45 | return $componentName; |
@@ -40,11 +40,11 @@ |
||
40 | 40 | $reader->parseInnerTree(); |
41 | 41 | |
42 | 42 | if (!is_string($property)) { |
43 | - throw new BadRequest('The {' . SearchPlugin::NS_Nextcloud . '}param-filter requires a valid property attribute'); |
|
43 | + throw new BadRequest('The {'.SearchPlugin::NS_Nextcloud.'}param-filter requires a valid property attribute'); |
|
44 | 44 | |
45 | 45 | } |
46 | 46 | if (!is_string($parameter)) { |
47 | - throw new BadRequest('The {' . SearchPlugin::NS_Nextcloud . '}param-filter requires a valid parameter attribute'); |
|
47 | + throw new BadRequest('The {'.SearchPlugin::NS_Nextcloud.'}param-filter requires a valid parameter attribute'); |
|
48 | 48 | } |
49 | 49 | |
50 | 50 | return [ |
@@ -107,36 +107,36 @@ discard block |
||
107 | 107 | switch ($elem['name']) { |
108 | 108 | case '{DAV:}prop': |
109 | 109 | $newProps['properties'] = array_keys($elem['value']); |
110 | - if (isset($elem['value']['{' . Plugin::NS_CALDAV . '}calendar-data'])) { |
|
111 | - $newProps += $elem['value']['{' . Plugin::NS_CALDAV . '}calendar-data']; |
|
110 | + if (isset($elem['value']['{'.Plugin::NS_CALDAV.'}calendar-data'])) { |
|
111 | + $newProps += $elem['value']['{'.Plugin::NS_CALDAV.'}calendar-data']; |
|
112 | 112 | } |
113 | 113 | break; |
114 | - case '{' . SearchPlugin::NS_Nextcloud . '}filter': |
|
114 | + case '{'.SearchPlugin::NS_Nextcloud.'}filter': |
|
115 | 115 | foreach ($elem['value'] as $subElem) { |
116 | - if ($subElem['name'] === '{' . SearchPlugin::NS_Nextcloud . '}comp-filter') { |
|
116 | + if ($subElem['name'] === '{'.SearchPlugin::NS_Nextcloud.'}comp-filter') { |
|
117 | 117 | if (!is_array($newProps['filters']['comps'])) { |
118 | 118 | $newProps['filters']['comps'] = []; |
119 | 119 | } |
120 | 120 | $newProps['filters']['comps'][] = $subElem['value']; |
121 | - } elseif ($subElem['name'] === '{' . SearchPlugin::NS_Nextcloud . '}prop-filter') { |
|
121 | + } elseif ($subElem['name'] === '{'.SearchPlugin::NS_Nextcloud.'}prop-filter') { |
|
122 | 122 | if (!is_array($newProps['filters']['props'])) { |
123 | 123 | $newProps['filters']['props'] = []; |
124 | 124 | } |
125 | 125 | $newProps['filters']['props'][] = $subElem['value']; |
126 | - } elseif ($subElem['name'] === '{' . SearchPlugin::NS_Nextcloud . '}param-filter') { |
|
126 | + } elseif ($subElem['name'] === '{'.SearchPlugin::NS_Nextcloud.'}param-filter') { |
|
127 | 127 | if (!is_array($newProps['filters']['params'])) { |
128 | 128 | $newProps['filters']['params'] = []; |
129 | 129 | } |
130 | 130 | $newProps['filters']['params'][] = $subElem['value']; |
131 | - } elseif ($subElem['name'] === '{' . SearchPlugin::NS_Nextcloud . '}search-term') { |
|
131 | + } elseif ($subElem['name'] === '{'.SearchPlugin::NS_Nextcloud.'}search-term') { |
|
132 | 132 | $newProps['filters']['search-term'] = $subElem['value']; |
133 | 133 | } |
134 | 134 | } |
135 | 135 | break; |
136 | - case '{' . SearchPlugin::NS_Nextcloud . '}limit': |
|
136 | + case '{'.SearchPlugin::NS_Nextcloud.'}limit': |
|
137 | 137 | $newProps['limit'] = $elem['value']; |
138 | 138 | break; |
139 | - case '{' . SearchPlugin::NS_Nextcloud . '}offset': |
|
139 | + case '{'.SearchPlugin::NS_Nextcloud.'}offset': |
|
140 | 140 | $newProps['offset'] = $elem['value']; |
141 | 141 | break; |
142 | 142 | |
@@ -144,13 +144,13 @@ discard block |
||
144 | 144 | } |
145 | 145 | |
146 | 146 | if (empty($newProps['filters'])) { |
147 | - throw new BadRequest('The {' . SearchPlugin::NS_Nextcloud . '}filter element is required for this request'); |
|
147 | + throw new BadRequest('The {'.SearchPlugin::NS_Nextcloud.'}filter element is required for this request'); |
|
148 | 148 | } |
149 | 149 | |
150 | 150 | $propsOrParamsDefined = (!empty($newProps['filters']['props']) || !empty($newProps['filters'])); |
151 | 151 | $noCompsDefined = empty($newProps['filters']['comps']); |
152 | 152 | if ($propsOrParamsDefined && $noCompsDefined) { |
153 | - throw new BadRequest('{' . SearchPlugin::NS_Nextcloud . '}prop-filter or {' . SearchPlugin::NS_Nextcloud . '}param-filter given without any {' . SearchPlugin::NS_Nextcloud . '}comp-filter'); |
|
153 | + throw new BadRequest('{'.SearchPlugin::NS_Nextcloud.'}prop-filter or {'.SearchPlugin::NS_Nextcloud.'}param-filter given without any {'.SearchPlugin::NS_Nextcloud.'}comp-filter'); |
|
154 | 154 | } |
155 | 155 | |
156 | 156 |
@@ -109,7 +109,7 @@ discard block |
||
109 | 109 | |
110 | 110 | } |
111 | 111 | |
112 | - throw new NotFound('Node with name \'' . $name . '\' could not be found'); |
|
112 | + throw new NotFound('Node with name \''.$name.'\' could not be found'); |
|
113 | 113 | } |
114 | 114 | |
115 | 115 | /** |
@@ -117,7 +117,7 @@ discard block |
||
117 | 117 | * @param integer|null $limit |
118 | 118 | * @param integer|null $offset |
119 | 119 | */ |
120 | - function calendarSearch(array $filters, $limit=null, $offset=null) { |
|
120 | + function calendarSearch(array $filters, $limit = null, $offset = null) { |
|
121 | 121 | $principalUri = $this->principalInfo['uri']; |
122 | 122 | return $this->caldavBackend->calendarSearch($principalUri, $filters, $limit, $offset); |
123 | 123 | } |