Passed
Push — master ( 24e25a...d3efd4 )
by Joas
29:31 queued 13:57
created
apps/dav/lib/Connector/Sabre/Exception/InvalidPath.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -49,17 +49,17 @@
 block discarded – undo
49 49
 	 * @param \DOMElement $errorNode
50 50
 	 * @return void
51 51
 	 */
52
-	public function serialize(\Sabre\DAV\Server $server,\DOMElement $errorNode) {
52
+	public function serialize(\Sabre\DAV\Server $server, \DOMElement $errorNode) {
53 53
 
54 54
 		// set ownCloud namespace
55 55
 		$errorNode->setAttribute('xmlns:o', self::NS_OWNCLOUD);
56 56
 
57 57
 		// adding the retry node
58
-		$error = $errorNode->ownerDocument->createElementNS('o:','o:retry', var_export($this->retry, true));
58
+		$error = $errorNode->ownerDocument->createElementNS('o:', 'o:retry', var_export($this->retry, true));
59 59
 		$errorNode->appendChild($error);
60 60
 
61 61
 		// adding the message node
62
-		$error = $errorNode->ownerDocument->createElementNS('o:','o:reason', $this->getMessage());
62
+		$error = $errorNode->ownerDocument->createElementNS('o:', 'o:reason', $this->getMessage());
63 63
 		$errorNode->appendChild($error);
64 64
 	}
65 65
 }
Please login to merge, or discard this patch.
apps/dav/lib/Connector/Sabre/QuotaPlugin.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
 			return;
93 93
 		}
94 94
 
95
-		return $this->checkQuota($parent->getPath() . '/' . basename($uri));
95
+		return $this->checkQuota($parent->getPath().'/'.basename($uri));
96 96
 	}
97 97
 
98 98
 	/**
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
 				// there is still enough space for the remaining chunks
164 164
 				$length -= $chunkHandler->getCurrentSize();
165 165
 				// use target file name for free space check in case of shared files
166
-				$path = rtrim($parentPath, '/') . '/' . $info['name'];
166
+				$path = rtrim($parentPath, '/').'/'.$info['name'];
167 167
 			}
168 168
 			$freeSpace = $this->getFreeSpace($path);
169 169
 			if ($freeSpace >= 0 && $length > $freeSpace) {
Please login to merge, or discard this patch.
apps/dav/lib/Connector/Sabre/FilesReportPlugin.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -186,14 +186,14 @@  discard block
 block discarded – undo
186 186
 			return;
187 187
 		}
188 188
 
189
-		$ns = '{' . $this::NS_OWNCLOUD . '}';
189
+		$ns = '{'.$this::NS_OWNCLOUD.'}';
190 190
 		$requestedProps = [];
191 191
 		$filterRules = [];
192 192
 
193 193
 		// parse report properties and gather filter info
194 194
 		foreach ($report as $reportProps) {
195 195
 			$name = $reportProps['name'];
196
-			if ($name === $ns . 'filter-rules') {
196
+			if ($name === $ns.'filter-rules') {
197 197
 				$filterRules = $reportProps['value'];
198 198
 			} elseif ($name === '{DAV:}prop') {
199 199
 				// propfind properties
@@ -254,7 +254,7 @@  discard block
 block discarded – undo
254 254
 		if (empty($filesUri)) {
255 255
 			return '';
256 256
 		}
257
-		return '/' . $filesUri;
257
+		return '/'.$filesUri;
258 258
 	}
259 259
 
260 260
 	/**
@@ -266,19 +266,19 @@  discard block
 block discarded – undo
266 266
 	 * @throws TagNotFoundException whenever a tag was not found
267 267
 	 */
268 268
 	protected function processFilterRules($filterRules) {
269
-		$ns = '{' . $this::NS_OWNCLOUD . '}';
269
+		$ns = '{'.$this::NS_OWNCLOUD.'}';
270 270
 		$resultFileIds = null;
271 271
 		$systemTagIds = [];
272 272
 		$circlesIds = [];
273 273
 		$favoriteFilter = null;
274 274
 		foreach ($filterRules as $filterRule) {
275
-			if ($filterRule['name'] === $ns . 'systemtag') {
275
+			if ($filterRule['name'] === $ns.'systemtag') {
276 276
 				$systemTagIds[] = $filterRule['value'];
277 277
 			}
278 278
 			if ($filterRule['name'] === self::CIRCLE_PROPERTYNAME) {
279 279
 				$circlesIds[] = $filterRule['value'];
280 280
 			}
281
-			if ($filterRule['name'] === $ns . 'favorite') {
281
+			if ($filterRule['name'] === $ns.'favorite') {
282 282
 				$favoriteFilter = true;
283 283
 			}
284 284
 		}
@@ -326,7 +326,7 @@  discard block
 block discarded – undo
326 326
 			}
327 327
 
328 328
 			if (!empty($unknownTagIds)) {
329
-				throw new TagNotFoundException('Tag with ids ' . implode(', ', $unknownTagIds) . ' not found');
329
+				throw new TagNotFoundException('Tag with ids '.implode(', ', $unknownTagIds).' not found');
330 330
 			}
331 331
 		}
332 332
 
@@ -379,7 +379,7 @@  discard block
 block discarded – undo
379 379
 	public function prepareResponses($filesUri, $requestedProps, $nodes) {
380 380
 		$responses = [];
381 381
 		foreach ($nodes as $node) {
382
-			$propFind = new PropFind($filesUri . $node->getPath(), $requestedProps);
382
+			$propFind = new PropFind($filesUri.$node->getPath(), $requestedProps);
383 383
 
384 384
 			$this->server->getPropertiesByNode($propFind, $node);
385 385
 			// copied from Sabre Server's getPropertiesForPath
@@ -392,7 +392,7 @@  discard block
 block discarded – undo
392 392
 			}
393 393
 
394 394
 			$responses[] = new Response(
395
-				rtrim($this->server->getBaseUri(), '/') . $filesUri . $node->getPath(),
395
+				rtrim($this->server->getBaseUri(), '/').$filesUri.$node->getPath(),
396 396
 				$result,
397 397
 				200
398 398
 			);
Please login to merge, or discard this patch.
apps/dav/lib/Connector/Sabre/ServerFactory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -141,7 +141,7 @@
 block discarded – undo
141 141
 		}
142 142
 
143 143
 		// wait with registering these until auth is handled and the filesystem is setup
144
-		$server->on('beforeMethod:*', function () use ($server, $objectTree, $viewCallBack) {
144
+		$server->on('beforeMethod:*', function() use ($server, $objectTree, $viewCallBack) {
145 145
 			// ensure the skeleton is copied
146 146
 			$userFolder = \OC::$server->getUserFolder();
147 147
 
Please login to merge, or discard this patch.
apps/dav/lib/Provisioning/Apple/AppleProvisioningPlugin.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
 	 * @return boolean
107 107
 	 */
108 108
 	public function httpGet(RequestInterface $request, ResponseInterface $response):bool {
109
-		if ($request->getPath() !== 'provisioning/' . AppleProvisioningNode::FILENAME) {
109
+		if ($request->getPath() !== 'provisioning/'.AppleProvisioningNode::FILENAME) {
110 110
 			return true;
111 111
 		}
112 112
 
@@ -144,19 +144,19 @@  discard block
 block discarded – undo
144 144
 		$carddavUUID = call_user_func($this->uuidClosure);
145 145
 		$profileUUID = call_user_func($this->uuidClosure);
146 146
 
147
-		$caldavIdentifier = $reverseDomain . '.' . $caldavUUID;
148
-		$carddavIdentifier = $reverseDomain . '.' . $carddavUUID;
149
-		$profileIdentifier = $reverseDomain . '.' . $profileUUID;
147
+		$caldavIdentifier = $reverseDomain.'.'.$caldavUUID;
148
+		$carddavIdentifier = $reverseDomain.'.'.$carddavUUID;
149
+		$profileIdentifier = $reverseDomain.'.'.$profileUUID;
150 150
 
151 151
 		$caldavDescription = $this->l10n->t('Configures a CalDAV account');
152
-		$caldavDisplayname = $description . ' CalDAV';
152
+		$caldavDisplayname = $description.' CalDAV';
153 153
 		$carddavDescription = $this->l10n->t('Configures a CardDAV account');
154
-		$carddavDisplayname = $description . ' CardDAV';
154
+		$carddavDisplayname = $description.' CardDAV';
155 155
 
156
-		$filename = $userId . '-' . AppleProvisioningNode::FILENAME;
156
+		$filename = $userId.'-'.AppleProvisioningNode::FILENAME;
157 157
 
158 158
 		$xmlSkeleton = $this->getTemplate();
159
-		$body = vsprintf($xmlSkeleton, array_map(function ($v) {
159
+		$body = vsprintf($xmlSkeleton, array_map(function($v) {
160 160
 			return \htmlspecialchars($v, ENT_XML1, 'UTF-8');
161 161
 		}, [
162 162
 			$description,
@@ -182,7 +182,7 @@  discard block
 block discarded – undo
182 182
 		));
183 183
 
184 184
 		$response->setStatus(200);
185
-		$response->setHeader('Content-Disposition', 'attachment; filename="' . $filename . '"');
185
+		$response->setHeader('Content-Disposition', 'attachment; filename="'.$filename.'"');
186 186
 		$response->setHeader('Content-Type', 'application/xml; charset=utf-8');
187 187
 		$response->setBody($body);
188 188
 
Please login to merge, or discard this patch.
apps/dav/lib/CalDAV/CachedSubscription.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -60,16 +60,16 @@  discard block
 block discarded – undo
60 60
 			],
61 61
 			[
62 62
 				'privilege' => '{DAV:}read',
63
-				'principal' => $this->getOwner() . '/calendar-proxy-write',
63
+				'principal' => $this->getOwner().'/calendar-proxy-write',
64 64
 				'protected' => true,
65 65
 			],
66 66
 			[
67 67
 				'privilege' => '{DAV:}read',
68
-				'principal' => $this->getOwner() . '/calendar-proxy-read',
68
+				'principal' => $this->getOwner().'/calendar-proxy-read',
69 69
 				'protected' => true,
70 70
 			],
71 71
 			[
72
-				'privilege' => '{' . Plugin::NS_CALDAV . '}read-free-busy',
72
+				'privilege' => '{'.Plugin::NS_CALDAV.'}read-free-busy',
73 73
 				'principal' => '{DAV:}authenticated',
74 74
 				'protected' => true,
75 75
 			],
@@ -89,12 +89,12 @@  discard block
 block discarded – undo
89 89
 
90 90
 			[
91 91
 				'privilege' => '{DAV:}read',
92
-				'principal' => $this->getOwner() . '/calendar-proxy-write',
92
+				'principal' => $this->getOwner().'/calendar-proxy-write',
93 93
 				'protected' => true,
94 94
 			],
95 95
 			[
96 96
 				'privilege' => '{DAV:}read',
97
-				'principal' => $this->getOwner() . '/calendar-proxy-read',
97
+				'principal' => $this->getOwner().'/calendar-proxy-read',
98 98
 				'protected' => true,
99 99
 			],
100 100
 
Please login to merge, or discard this patch.
apps/dav/lib/CalDAV/Reminder/Notifier.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -256,10 +256,10 @@  discard block
 block discarded – undo
256 256
 			]);
257 257
 
258 258
 			return $localeStart
259
-				. ' (' . $startTimezone . ') '
259
+				. ' ('.$startTimezone.') '
260 260
 				. ' - '
261 261
 				. $localeEnd
262
-				. ' (' . $endTimezone . ')';
262
+				. ' ('.$endTimezone.')';
263 263
 		}
264 264
 
265 265
 		// Show only the time if the day is the same
@@ -273,7 +273,7 @@  discard block
 block discarded – undo
273 273
 		return $localeStart
274 274
 			. ' - '
275 275
 			. $localeEnd
276
-			. ' (' . $startTimezone . ')';
276
+			. ' ('.$startTimezone.')';
277 277
 	}
278 278
 
279 279
 	/**
Please login to merge, or discard this patch.
apps/dav/lib/Command/ListCalendars.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
 			}
78 78
 
79 79
 			$readOnly = false;
80
-			$readOnlyIndex = '{' . \OCA\DAV\DAV\Sharing\Plugin::NS_OWNCLOUD . '}read-only';
80
+			$readOnlyIndex = '{'.\OCA\DAV\DAV\Sharing\Plugin::NS_OWNCLOUD.'}read-only';
81 81
 			if (isset($calendar[$readOnlyIndex])) {
82 82
 				$readOnly = $calendar[$readOnlyIndex];
83 83
 			}
@@ -85,8 +85,8 @@  discard block
 block discarded – undo
85 85
 			$calendarTableData[] = [
86 86
 				$calendar['uri'],
87 87
 				$calendar['{DAV:}displayname'],
88
-				$calendar['{' . \OCA\DAV\DAV\Sharing\Plugin::NS_OWNCLOUD . '}owner-principal'],
89
-				$calendar['{' . \OCA\DAV\DAV\Sharing\Plugin::NS_NEXTCLOUD . '}owner-displayname'],
88
+				$calendar['{'.\OCA\DAV\DAV\Sharing\Plugin::NS_OWNCLOUD.'}owner-principal'],
89
+				$calendar['{'.\OCA\DAV\DAV\Sharing\Plugin::NS_NEXTCLOUD.'}owner-displayname'],
90 90
 				$readOnly ? ' x ' : ' ✓ ',
91 91
 			];
92 92
 		}
Please login to merge, or discard this patch.
apps/dav/lib/Comments/CommentsPlugin.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
 
92 92
 		$this->server->xml->namespaceMap[self::NS_OWNCLOUD] = 'oc';
93 93
 
94
-		$this->server->xml->classMap['DateTime'] = function (Writer $writer, \DateTime $value) {
94
+		$this->server->xml->classMap['DateTime'] = function(Writer $writer, \DateTime $value) {
95 95
 			$writer->write(\Sabre\HTTP\toDate($value));
96 96
 		};
97 97
 
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
 		// having their own comments marked as unread
126 126
 		$node->setReadMarker(null);
127 127
 
128
-		$url = rtrim($request->getUrl(), '/') . '/' . urlencode($comment->getId());
128
+		$url = rtrim($request->getUrl(), '/').'/'.urlencode($comment->getId());
129 129
 
130 130
 		$response->setHeader('Content-Location', $url);
131 131
 
@@ -167,7 +167,7 @@  discard block
 block discarded – undo
167 167
 			$this::REPORT_PARAM_OFFSET,
168 168
 			$this::REPORT_PARAM_TIMESTAMP
169 169
 		];
170
-		$ns = '{' . $this::NS_OWNCLOUD . '}';
170
+		$ns = '{'.$this::NS_OWNCLOUD.'}';
171 171
 		foreach ($report as $parameter) {
172 172
 			if (!in_array($parameter['name'], $acceptableParameters) || empty($parameter['value'])) {
173 173
 				continue;
@@ -183,11 +183,11 @@  discard block
 block discarded – undo
183 183
 
184 184
 		$responses = [];
185 185
 		foreach ($results as $node) {
186
-			$nodePath = $this->server->getRequestUri() . '/' . $node->comment->getId();
186
+			$nodePath = $this->server->getRequestUri().'/'.$node->comment->getId();
187 187
 			$resultSet = $this->server->getPropertiesForPath($nodePath, CommentNode::getPropertyNames());
188 188
 			if (isset($resultSet[0]) && isset($resultSet[0][200])) {
189 189
 				$responses[] = new Response(
190
-					$this->server->getBaseUri() . $nodePath,
190
+					$this->server->getBaseUri().$nodePath,
191 191
 					[200 => $resultSet[0][200]],
192 192
 					200
193 193
 				);
@@ -234,7 +234,7 @@  discard block
 block discarded – undo
234 234
 			}
235 235
 		}
236 236
 		if (is_null($actorId)) {
237
-			throw new BadRequest('Invalid actor "' .  $actorType .'"');
237
+			throw new BadRequest('Invalid actor "'.$actorType.'"');
238 238
 		}
239 239
 
240 240
 		try {
@@ -247,7 +247,7 @@  discard block
 block discarded – undo
247 247
 			throw new BadRequest('Invalid input values', 0, $e);
248 248
 		} catch (\OCP\Comments\MessageTooLongException $e) {
249 249
 			$msg = 'Message exceeds allowed character limit of ';
250
-			throw new BadRequest($msg . \OCP\Comments\IComment::MAX_MESSAGE_LENGTH, 0,	$e);
250
+			throw new BadRequest($msg.\OCP\Comments\IComment::MAX_MESSAGE_LENGTH, 0, $e);
251 251
 		}
252 252
 	}
253 253
 }
Please login to merge, or discard this patch.