Completed
Pull Request — master (#6959)
by Maxence
15:31
created
apps/dav/lib/Connector/Sabre/FilesReportPlugin.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -173,14 +173,14 @@  discard block
 block discarded – undo
173 173
 			return;
174 174
 		}
175 175
 
176
-		$ns = '{' . $this::NS_OWNCLOUD . '}';
176
+		$ns = '{'.$this::NS_OWNCLOUD.'}';
177 177
 		$requestedProps = [];
178 178
 		$filterRules = [];
179 179
 
180 180
 		// parse report properties and gather filter info
181 181
 		foreach ($report as $reportProps) {
182 182
 			$name = $reportProps['name'];
183
-			if ($name === $ns . 'filter-rules') {
183
+			if ($name === $ns.'filter-rules') {
184 184
 				$filterRules = $reportProps['value'];
185 185
 			} else if ($name === '{DAV:}prop') {
186 186
 				// propfind properties
@@ -241,7 +241,7 @@  discard block
 block discarded – undo
241 241
 		if (empty($filesUri)) {
242 242
 			return '';
243 243
 		}
244
-		return '/' . $filesUri;
244
+		return '/'.$filesUri;
245 245
 	}
246 246
 
247 247
 	/**
@@ -253,19 +253,19 @@  discard block
 block discarded – undo
253 253
 	 * @throws TagNotFoundException whenever a tag was not found
254 254
 	 */
255 255
 	protected function processFilterRules($filterRules) {
256
-		$ns = '{' . $this::NS_OWNCLOUD . '}';
256
+		$ns = '{'.$this::NS_OWNCLOUD.'}';
257 257
 		$resultFileIds = null;
258 258
 		$systemTagIds = [];
259 259
 		$circlesIds = [];
260 260
 		$favoriteFilter = null;
261 261
 		foreach ($filterRules as $filterRule) {
262
-			if ($filterRule['name'] === $ns . 'systemtag') {
262
+			if ($filterRule['name'] === $ns.'systemtag') {
263 263
 				$systemTagIds[] = $filterRule['value'];
264 264
 			}
265
-			if ($filterRule['name'] === $ns . 'circle') {
265
+			if ($filterRule['name'] === $ns.'circle') {
266 266
 				$circlesIds[] = $filterRule['value'];
267 267
 			}
268
-			if ($filterRule['name'] === $ns . 'favorite') {
268
+			if ($filterRule['name'] === $ns.'favorite') {
269 269
 				$favoriteFilter = true;
270 270
 			}
271 271
 
@@ -314,7 +314,7 @@  discard block
 block discarded – undo
314 314
 			}
315 315
 
316 316
 			if (!empty($unknownTagIds)) {
317
-				throw new TagNotFoundException('Tag with ids ' . implode(', ', $unknownTagIds) . ' not found');
317
+				throw new TagNotFoundException('Tag with ids '.implode(', ', $unknownTagIds).' not found');
318 318
 			}
319 319
 		}
320 320
 
@@ -377,7 +377,7 @@  discard block
 block discarded – undo
377 377
 	public function prepareResponses($filesUri, $requestedProps, $nodes) {
378 378
 		$responses = [];
379 379
 		foreach ($nodes as $node) {
380
-			$propFind = new PropFind($filesUri . $node->getPath(), $requestedProps);
380
+			$propFind = new PropFind($filesUri.$node->getPath(), $requestedProps);
381 381
 
382 382
 			$this->server->getPropertiesByNode($propFind, $node);
383 383
 			// copied from Sabre Server's getPropertiesForPath
@@ -390,7 +390,7 @@  discard block
 block discarded – undo
390 390
 			}
391 391
 
392 392
 			$responses[] = new Response(
393
-				rtrim($this->server->getBaseUri(), '/') . $filesUri . $node->getPath(),
393
+				rtrim($this->server->getBaseUri(), '/').$filesUri.$node->getPath(),
394 394
 				$result,
395 395
 				200
396 396
 			);
Please login to merge, or discard this patch.
apps/dav/lib/Connector/Sabre/Principal.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
 		$principals = [];
90 90
 
91 91
 		if ($prefixPath === $this->principalPrefix) {
92
-			foreach($this->userManager->search('') as $user) {
92
+			foreach ($this->userManager->search('') as $user) {
93 93
 				$principals[] = $this->userToPrincipal($user);
94 94
 			}
95 95
 		}
@@ -158,7 +158,7 @@  discard block
 block discarded – undo
158 158
 				$groups = $this->groupManager->getUserGroups($user);
159 159
 				$groups = array_map(function($group) {
160 160
 					/** @var IGroup $group */
161
-					return 'principals/groups/' . urlencode($group->getGID());
161
+					return 'principals/groups/'.urlencode($group->getGID());
162 162
 				}, $groups);
163 163
 
164 164
 				return $groups;
@@ -209,7 +209,7 @@  discard block
 block discarded – undo
209 209
 			$email = substr($uri, 7);
210 210
 			$users = $this->userManager->getByEmail($email);
211 211
 			if (count($users) === 1) {
212
-				return $this->principalPrefix . '/' . $users[0]->getUID();
212
+				return $this->principalPrefix.'/'.$users[0]->getUID();
213 213
 			}
214 214
 		}
215 215
 
@@ -224,7 +224,7 @@  discard block
 block discarded – undo
224 224
 		$userId = $user->getUID();
225 225
 		$displayName = $user->getDisplayName();
226 226
 		$principal = [
227
-				'uri' => $this->principalPrefix . '/' . $userId,
227
+				'uri' => $this->principalPrefix.'/'.$userId,
228 228
 				'{DAV:}displayname' => is_null($displayName) ? $userId : $displayName,
229 229
 		];
230 230
 
@@ -256,7 +256,7 @@  discard block
 block discarded – undo
256 256
 		}
257 257
 
258 258
 		$principal = [
259
-			'uri' => 'principals/circles/' . $circleUniqueId,
259
+			'uri' => 'principals/circles/'.$circleUniqueId,
260 260
 			'{DAV:}displayname' => $circle->getName(),
261 261
 		];
262 262
 
@@ -284,9 +284,9 @@  discard block
 block discarded – undo
284 284
 			}
285 285
 
286 286
 			$circles = \OCA\Circles\Api\v1\Circles::joinedCircles($user->getUID());
287
-			$circles = array_map(function ($circle) {
287
+			$circles = array_map(function($circle) {
288 288
 				/** @var \OCA\Circles\Model\Circle $group */
289
-				return 'principals/circles/' . urlencode($circle->getUniqueId());
289
+				return 'principals/circles/'.urlencode($circle->getUniqueId());
290 290
 			}, $circles);
291 291
 
292 292
 			return $circles;
Please login to merge, or discard this patch.