Passed
Push — master ( 0ecef7...7d2f5a )
by Blizzz
13:12 queued 11s
created
apps/dav/lib/CardDAV/CardDavBackend.php 1 patch
Spacing   +37 added lines, -37 removed lines patch added patch discarded remove patch
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
 			->from('addressbooks')
127 127
 			->where($query->expr()->eq('principaluri', $query->createNamedParameter($principalUri)));
128 128
 
129
-		return (int)$query->execute()->fetchColumn();
129
+		return (int) $query->execute()->fetchColumn();
130 130
 	}
131 131
 
132 132
 	/**
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
 				'uri' => $row['uri'],
164 164
 				'principaluri' => $this->convertPrincipal($row['principaluri'], false),
165 165
 				'{DAV:}displayname' => $row['displayname'],
166
-				'{' . Plugin::NS_CARDDAV . '}addressbook-description' => $row['description'],
166
+				'{'.Plugin::NS_CARDDAV.'}addressbook-description' => $row['description'],
167 167
 				'{http://calendarserver.org/ns/}getctag' => $row['synctoken'],
168 168
 				'{http://sabredav.org/ns}sync-token' => $row['synctoken'] ?: '0',
169 169
 			];
@@ -176,7 +176,7 @@  discard block
 block discarded – undo
176 176
 		$principals = $this->principalBackend->getGroupMembership($principalUriOriginal, true);
177 177
 		$principals = array_merge($principals, $this->principalBackend->getCircleMembership($principalUriOriginal));
178 178
 
179
-		$principals = array_map(function ($principal) {
179
+		$principals = array_map(function($principal) {
180 180
 			return urldecode($principal);
181 181
 		}, $principals);
182 182
 		$principals[] = $principalUri;
@@ -191,13 +191,13 @@  discard block
 block discarded – undo
191 191
 			->setParameter('principaluri', $principals, IQueryBuilder::PARAM_STR_ARRAY)
192 192
 			->execute();
193 193
 
194
-		$readOnlyPropertyName = '{' . \OCA\DAV\DAV\Sharing\Plugin::NS_OWNCLOUD . '}read-only';
194
+		$readOnlyPropertyName = '{'.\OCA\DAV\DAV\Sharing\Plugin::NS_OWNCLOUD.'}read-only';
195 195
 		while ($row = $result->fetch()) {
196 196
 			if ($row['principaluri'] === $principalUri) {
197 197
 				continue;
198 198
 			}
199 199
 
200
-			$readOnly = (int)$row['access'] === Backend::ACCESS_READ;
200
+			$readOnly = (int) $row['access'] === Backend::ACCESS_READ;
201 201
 			if (isset($addressBooks[$row['id']])) {
202 202
 				if ($readOnly) {
203 203
 					// New share can not have more permissions then the old one.
@@ -211,18 +211,18 @@  discard block
 block discarded – undo
211 211
 			}
212 212
 
213 213
 			list(, $name) = \Sabre\Uri\split($row['principaluri']);
214
-			$uri = $row['uri'] . '_shared_by_' . $name;
215
-			$displayName = $row['displayname'] . ' (' . $this->getUserDisplayName($name) . ')';
214
+			$uri = $row['uri'].'_shared_by_'.$name;
215
+			$displayName = $row['displayname'].' ('.$this->getUserDisplayName($name).')';
216 216
 
217 217
 			$addressBooks[$row['id']] = [
218 218
 				'id' => $row['id'],
219 219
 				'uri' => $uri,
220 220
 				'principaluri' => $principalUriOriginal,
221 221
 				'{DAV:}displayname' => $displayName,
222
-				'{' . Plugin::NS_CARDDAV . '}addressbook-description' => $row['description'],
222
+				'{'.Plugin::NS_CARDDAV.'}addressbook-description' => $row['description'],
223 223
 				'{http://calendarserver.org/ns/}getctag' => $row['synctoken'],
224 224
 				'{http://sabredav.org/ns}sync-token' => $row['synctoken'] ?: '0',
225
-				'{' . \OCA\DAV\DAV\Sharing\Plugin::NS_OWNCLOUD . '}owner-principal' => $row['principaluri'],
225
+				'{'.\OCA\DAV\DAV\Sharing\Plugin::NS_OWNCLOUD.'}owner-principal' => $row['principaluri'],
226 226
 				$readOnlyPropertyName => $readOnly,
227 227
 			];
228 228
 
@@ -249,7 +249,7 @@  discard block
 block discarded – undo
249 249
 				'uri' => $row['uri'],
250 250
 				'principaluri' => $this->convertPrincipal($row['principaluri'], false),
251 251
 				'{DAV:}displayname' => $row['displayname'],
252
-				'{' . Plugin::NS_CARDDAV . '}addressbook-description' => $row['description'],
252
+				'{'.Plugin::NS_CARDDAV.'}addressbook-description' => $row['description'],
253 253
 				'{http://calendarserver.org/ns/}getctag' => $row['synctoken'],
254 254
 				'{http://sabredav.org/ns}sync-token' => $row['synctoken'] ?: '0',
255 255
 			];
@@ -296,7 +296,7 @@  discard block
 block discarded – undo
296 296
 			'uri' => $row['uri'],
297 297
 			'principaluri' => $row['principaluri'],
298 298
 			'{DAV:}displayname' => $row['displayname'],
299
-			'{' . Plugin::NS_CARDDAV . '}addressbook-description' => $row['description'],
299
+			'{'.Plugin::NS_CARDDAV.'}addressbook-description' => $row['description'],
300 300
 			'{http://calendarserver.org/ns/}getctag' => $row['synctoken'],
301 301
 			'{http://sabredav.org/ns}sync-token' => $row['synctoken'] ?: '0',
302 302
 		];
@@ -330,7 +330,7 @@  discard block
 block discarded – undo
330 330
 			'uri' => $row['uri'],
331 331
 			'principaluri' => $row['principaluri'],
332 332
 			'{DAV:}displayname' => $row['displayname'],
333
-			'{' . Plugin::NS_CARDDAV . '}addressbook-description' => $row['description'],
333
+			'{'.Plugin::NS_CARDDAV.'}addressbook-description' => $row['description'],
334 334
 			'{http://calendarserver.org/ns/}getctag' => $row['synctoken'],
335 335
 			'{http://sabredav.org/ns}sync-token' => $row['synctoken'] ?: '0',
336 336
 		];
@@ -359,20 +359,20 @@  discard block
 block discarded – undo
359 359
 	public function updateAddressBook($addressBookId, \Sabre\DAV\PropPatch $propPatch) {
360 360
 		$supportedProperties = [
361 361
 			'{DAV:}displayname',
362
-			'{' . Plugin::NS_CARDDAV . '}addressbook-description',
362
+			'{'.Plugin::NS_CARDDAV.'}addressbook-description',
363 363
 		];
364 364
 
365 365
 		/**
366 366
 		 * @suppress SqlInjectionChecker
367 367
 		 */
368
-		$propPatch->handle($supportedProperties, function ($mutations) use ($addressBookId) {
368
+		$propPatch->handle($supportedProperties, function($mutations) use ($addressBookId) {
369 369
 			$updates = [];
370 370
 			foreach ($mutations as $property => $newValue) {
371 371
 				switch ($property) {
372 372
 					case '{DAV:}displayname':
373 373
 						$updates['displayname'] = $newValue;
374 374
 						break;
375
-					case '{' . Plugin::NS_CARDDAV . '}addressbook-description':
375
+					case '{'.Plugin::NS_CARDDAV.'}addressbook-description':
376 376
 						$updates['description'] = $newValue;
377 377
 						break;
378 378
 				}
@@ -415,11 +415,11 @@  discard block
 block discarded – undo
415 415
 				case '{DAV:}displayname':
416 416
 					$values['displayname'] = $newValue;
417 417
 					break;
418
-				case '{' . Plugin::NS_CARDDAV . '}addressbook-description':
418
+				case '{'.Plugin::NS_CARDDAV.'}addressbook-description':
419 419
 					$values['description'] = $newValue;
420 420
 					break;
421 421
 				default:
422
-					throw new BadRequest('Unknown property: ' . $property);
422
+					throw new BadRequest('Unknown property: '.$property);
423 423
 			}
424 424
 		}
425 425
 
@@ -503,7 +503,7 @@  discard block
 block discarded – undo
503 503
 
504 504
 		$result = $query->execute();
505 505
 		while ($row = $result->fetch()) {
506
-			$row['etag'] = '"' . $row['etag'] . '"';
506
+			$row['etag'] = '"'.$row['etag'].'"';
507 507
 
508 508
 			$modified = false;
509 509
 			$row['carddata'] = $this->readBlob($row['carddata'], $modified);
@@ -543,7 +543,7 @@  discard block
 block discarded – undo
543 543
 		if (!$row) {
544 544
 			return false;
545 545
 		}
546
-		$row['etag'] = '"' . $row['etag'] . '"';
546
+		$row['etag'] = '"'.$row['etag'].'"';
547 547
 
548 548
 		$modified = false;
549 549
 		$row['carddata'] = $this->readBlob($row['carddata'], $modified);
@@ -585,7 +585,7 @@  discard block
 block discarded – undo
585 585
 			$result = $query->execute();
586 586
 
587 587
 			while ($row = $result->fetch()) {
588
-				$row['etag'] = '"' . $row['etag'] . '"';
588
+				$row['etag'] = '"'.$row['etag'].'"';
589 589
 
590 590
 				$modified = false;
591 591
 				$row['carddata'] = $this->readBlob($row['carddata'], $modified);
@@ -636,7 +636,7 @@  discard block
 block discarded – undo
636 636
 			->andWhere($q->expr()->eq('uid', $q->createNamedParameter($uid)))
637 637
 			->setMaxResults(1);
638 638
 		$result = $q->execute();
639
-		$count = (bool)$result->fetchColumn();
639
+		$count = (bool) $result->fetchColumn();
640 640
 		$result->closeCursor();
641 641
 		if ($count) {
642 642
 			throw new \Sabre\DAV\Exception\BadRequest('VCard object with uid already exists in this addressbook collection.');
@@ -667,7 +667,7 @@  discard block
 block discarded – undo
667 667
 				'cardUri' => $cardUri,
668 668
 				'cardData' => $cardData]));
669 669
 
670
-		return '"' . $etag . '"';
670
+		return '"'.$etag.'"';
671 671
 	}
672 672
 
673 673
 	/**
@@ -703,7 +703,7 @@  discard block
 block discarded – undo
703 703
 		// check for recently stored etag and stop if it is the same
704 704
 		$etagCacheKey = "$addressBookId#$cardUri";
705 705
 		if (isset($this->etagCache[$etagCacheKey]) && $this->etagCache[$etagCacheKey] === $etag) {
706
-			return '"' . $etag . '"';
706
+			return '"'.$etag.'"';
707 707
 		}
708 708
 
709 709
 		$query->update($this->dbCardsTable)
@@ -727,7 +727,7 @@  discard block
 block discarded – undo
727 727
 				'cardUri' => $cardUri,
728 728
 				'cardData' => $cardData]));
729 729
 
730
-		return '"' . $etag . '"';
730
+		return '"'.$etag.'"';
731 731
 	}
732 732
 
733 733
 	/**
@@ -842,7 +842,7 @@  discard block
 block discarded – undo
842 842
 		if ($syncToken) {
843 843
 			$query = "SELECT `uri`, `operation` FROM `*PREFIX*addressbookchanges` WHERE `synctoken` >= ? AND `synctoken` < ? AND `addressbookid` = ? ORDER BY `synctoken`";
844 844
 			if ($limit > 0) {
845
-				$query .= " LIMIT " . (int)$limit;
845
+				$query .= " LIMIT ".(int) $limit;
846 846
 			}
847 847
 
848 848
 			// Fetching all changes
@@ -979,7 +979,7 @@  discard block
 block discarded – undo
979 979
 									   string $pattern,
980 980
 									   array $searchProperties,
981 981
 									   array $options = []): array {
982
-		$addressBookIds = array_map(static function ($row):int {
982
+		$addressBookIds = array_map(static function($row):int {
983 983
 			return (int) $row['id'];
984 984
 		}, $this->getAddressBooksForUser($principalUri));
985 985
 
@@ -1001,7 +1001,7 @@  discard block
 block discarded – undo
1001 1001
 
1002 1002
 		$query2 = $this->db->getQueryBuilder();
1003 1003
 
1004
-		$addressBookOr =  $query2->expr()->orX();
1004
+		$addressBookOr = $query2->expr()->orX();
1005 1005
 		foreach ($addressBookIds as $addressBookId) {
1006 1006
 			$addressBookOr->add($query2->expr()->eq('cp.addressbookid', $query2->createNamedParameter($addressBookId)));
1007 1007
 		}
@@ -1042,7 +1042,7 @@  discard block
 block discarded – undo
1042 1042
 			if (!$escapePattern) {
1043 1043
 				$query2->andWhere($query2->expr()->ilike('cp.value', $query2->createNamedParameter($pattern)));
1044 1044
 			} else {
1045
-				$query2->andWhere($query2->expr()->ilike('cp.value', $query2->createNamedParameter('%' . $this->db->escapeLikeParameter($pattern) . '%')));
1045
+				$query2->andWhere($query2->expr()->ilike('cp.value', $query2->createNamedParameter('%'.$this->db->escapeLikeParameter($pattern).'%')));
1046 1046
 			}
1047 1047
 		}
1048 1048
 
@@ -1056,8 +1056,8 @@  discard block
 block discarded – undo
1056 1056
 		$result = $query2->execute();
1057 1057
 		$matches = $result->fetchAll();
1058 1058
 		$result->closeCursor();
1059
-		$matches = array_map(function ($match) {
1060
-			return (int)$match['cardid'];
1059
+		$matches = array_map(function($match) {
1060
+			return (int) $match['cardid'];
1061 1061
 		}, $matches);
1062 1062
 
1063 1063
 		$query = $this->db->getQueryBuilder();
@@ -1070,7 +1070,7 @@  discard block
 block discarded – undo
1070 1070
 
1071 1071
 		$result->closeCursor();
1072 1072
 
1073
-		return array_map(function ($array) {
1073
+		return array_map(function($array) {
1074 1074
 			$array['addressbookid'] = (int) $array['addressbookid'];
1075 1075
 			$modified = false;
1076 1076
 			$array['carddata'] = $this->readBlob($array['carddata'], $modified);
@@ -1117,7 +1117,7 @@  discard block
 block discarded – undo
1117 1117
 		$result->closeCursor();
1118 1118
 
1119 1119
 		if (!isset($uri['uri'])) {
1120
-			throw new \InvalidArgumentException('Card does not exists: ' . $id);
1120
+			throw new \InvalidArgumentException('Card does not exists: '.$id);
1121 1121
 		}
1122 1122
 
1123 1123
 		return $uri['uri'];
@@ -1142,7 +1142,7 @@  discard block
 block discarded – undo
1142 1142
 
1143 1143
 		if (is_array($contact)) {
1144 1144
 			$modified = false;
1145
-			$contact['etag'] = '"' . $contact['etag'] . '"';
1145
+			$contact['etag'] = '"'.$contact['etag'].'"';
1146 1146
 			$contact['carddata'] = $this->readBlob($contact['carddata'], $modified);
1147 1147
 			if ($modified) {
1148 1148
 				$contact['size'] = strlen($contact['carddata']);
@@ -1255,10 +1255,10 @@  discard block
 block discarded – undo
1255 1255
 		$result->closeCursor();
1256 1256
 
1257 1257
 		if (!isset($cardIds['id'])) {
1258
-			throw new \InvalidArgumentException('Card does not exists: ' . $uri);
1258
+			throw new \InvalidArgumentException('Card does not exists: '.$uri);
1259 1259
 		}
1260 1260
 
1261
-		return (int)$cardIds['id'];
1261
+		return (int) $cardIds['id'];
1262 1262
 	}
1263 1263
 
1264 1264
 	/**
@@ -1284,8 +1284,8 @@  discard block
 block discarded – undo
1284 1284
 	}
1285 1285
 
1286 1286
 	private function addOwnerPrincipal(&$addressbookInfo) {
1287
-		$ownerPrincipalKey = '{' . \OCA\DAV\DAV\Sharing\Plugin::NS_OWNCLOUD . '}owner-principal';
1288
-		$displaynameKey = '{' . \OCA\DAV\DAV\Sharing\Plugin::NS_NEXTCLOUD . '}owner-displayname';
1287
+		$ownerPrincipalKey = '{'.\OCA\DAV\DAV\Sharing\Plugin::NS_OWNCLOUD.'}owner-principal';
1288
+		$displaynameKey = '{'.\OCA\DAV\DAV\Sharing\Plugin::NS_NEXTCLOUD.'}owner-displayname';
1289 1289
 		if (isset($addressbookInfo[$ownerPrincipalKey])) {
1290 1290
 			$uri = $addressbookInfo[$ownerPrincipalKey];
1291 1291
 		} else {
Please login to merge, or discard this patch.
apps/federatedfilesharing/lib/OCM/CloudFederationProviderFiles.php 1 patch
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -184,7 +184,7 @@  discard block
 block discarded – undo
184 184
 		// for backward compatibility make sure that the remote url stored in the
185 185
 		// database ends with a trailing slash
186 186
 		if (substr($remote, -1) !== '/') {
187
-			$remote = $remote . '/';
187
+			$remote = $remote.'/';
188 188
 		}
189 189
 
190 190
 		$token = $share->getShareSecret();
@@ -211,23 +211,23 @@  discard block
 block discarded – undo
211 211
 
212 212
 			// FIXME this should be a method in the user management instead
213 213
 			if ($shareType === IShare::TYPE_USER) {
214
-				$this->logger->debug('shareWith before, ' . $shareWith, ['app' => 'files_sharing']);
214
+				$this->logger->debug('shareWith before, '.$shareWith, ['app' => 'files_sharing']);
215 215
 				Util::emitHook(
216 216
 					'\OCA\Files_Sharing\API\Server2Server',
217 217
 					'preLoginNameUsedAsUserName',
218 218
 					['uid' => &$shareWith]
219 219
 				);
220
-				$this->logger->debug('shareWith after, ' . $shareWith, ['app' => 'files_sharing']);
220
+				$this->logger->debug('shareWith after, '.$shareWith, ['app' => 'files_sharing']);
221 221
 
222 222
 				if (!$this->userManager->userExists($shareWith)) {
223
-					throw new ProviderCouldNotAddShareException('User does not exists', '',Http::STATUS_BAD_REQUEST);
223
+					throw new ProviderCouldNotAddShareException('User does not exists', '', Http::STATUS_BAD_REQUEST);
224 224
 				}
225 225
 
226 226
 				\OC_Util::setupFS($shareWith);
227 227
 			}
228 228
 
229 229
 			if ($shareType === IShare::TYPE_GROUP && !$this->groupManager->groupExists($shareWith)) {
230
-				throw new ProviderCouldNotAddShareException('Group does not exists', '',Http::STATUS_BAD_REQUEST);
230
+				throw new ProviderCouldNotAddShareException('Group does not exists', '', Http::STATUS_BAD_REQUEST);
231 231
 			}
232 232
 
233 233
 			$externalManager = new \OCA\Files_Sharing\External\Manager(
@@ -246,7 +246,7 @@  discard block
 block discarded – undo
246 246
 			);
247 247
 
248 248
 			try {
249
-				$externalManager->addShare($remote, $token, '', $name, $owner, $shareType,false, $shareWith, $remoteId);
249
+				$externalManager->addShare($remote, $token, '', $name, $owner, $shareType, false, $shareWith, $remoteId);
250 250
 				$shareId = \OC::$server->getDatabaseConnection()->lastInsertId('*PREFIX*share_external');
251 251
 
252 252
 				if ($shareType === IShare::TYPE_USER) {
@@ -255,7 +255,7 @@  discard block
 block discarded – undo
255 255
 						->setType('remote_share')
256 256
 						->setSubject(RemoteShares::SUBJECT_REMOTE_SHARE_RECEIVED, [$ownerFederatedId, trim($name, '/')])
257 257
 						->setAffectedUser($shareWith)
258
-						->setObject('remote_share', (int)$shareId, $name);
258
+						->setObject('remote_share', (int) $shareId, $name);
259 259
 					\OC::$server->getActivityManager()->publish($event);
260 260
 					$this->notifyAboutNewShare($shareWith, $shareId, $ownerFederatedId, $sharedByFederatedId, $name);
261 261
 				} else {
@@ -266,7 +266,7 @@  discard block
 block discarded – undo
266 266
 							->setType('remote_share')
267 267
 							->setSubject(RemoteShares::SUBJECT_REMOTE_SHARE_RECEIVED, [$ownerFederatedId, trim($name, '/')])
268 268
 							->setAffectedUser($user->getUID())
269
-							->setObject('remote_share', (int)$shareId, $name);
269
+							->setObject('remote_share', (int) $shareId, $name);
270 270
 						\OC::$server->getActivityManager()->publish($event);
271 271
 						$this->notifyAboutNewShare($user->getUID(), $shareId, $ownerFederatedId, $sharedByFederatedId, $name);
272 272
 					}
@@ -278,7 +278,7 @@  discard block
 block discarded – undo
278 278
 					'level' => ILogger::ERROR,
279 279
 					'app' => 'files_sharing'
280 280
 				]);
281
-				throw new ProviderCouldNotAddShareException('internal server error, was not able to add share from ' . $remote, '', HTTP::STATUS_INTERNAL_SERVER_ERROR);
281
+				throw new ProviderCouldNotAddShareException('internal server error, was not able to add share from '.$remote, '', HTTP::STATUS_INTERNAL_SERVER_ERROR);
282 282
 			}
283 283
 		}
284 284
 
@@ -344,12 +344,12 @@  discard block
 block discarded – undo
344 344
 
345 345
 		$declineAction = $notification->createAction();
346 346
 		$declineAction->setLabel('decline')
347
-			->setLink($this->urlGenerator->getAbsoluteURL($this->urlGenerator->linkTo('', 'ocs/v2.php/apps/files_sharing/api/v1/remote_shares/pending/' . $shareId)), 'DELETE');
347
+			->setLink($this->urlGenerator->getAbsoluteURL($this->urlGenerator->linkTo('', 'ocs/v2.php/apps/files_sharing/api/v1/remote_shares/pending/'.$shareId)), 'DELETE');
348 348
 		$notification->addAction($declineAction);
349 349
 
350 350
 		$acceptAction = $notification->createAction();
351 351
 		$acceptAction->setLabel('accept')
352
-			->setLink($this->urlGenerator->getAbsoluteURL($this->urlGenerator->linkTo('', 'ocs/v2.php/apps/files_sharing/api/v1/remote_shares/pending/' . $shareId)), 'POST');
352
+			->setLink($this->urlGenerator->getAbsoluteURL($this->urlGenerator->linkTo('', 'ocs/v2.php/apps/files_sharing/api/v1/remote_shares/pending/'.$shareId)), 'POST');
353 353
 		$notification->addAction($acceptAction);
354 354
 
355 355
 		$this->notificationManager->notify($notification);
@@ -407,7 +407,7 @@  discard block
 block discarded – undo
407 407
 	 */
408 408
 	protected function executeAcceptShare(IShare $share) {
409 409
 		try {
410
-			$fileId = (int)$share->getNode()->getId();
410
+			$fileId = (int) $share->getNode()->getId();
411 411
 			list($file, $link) = $this->getFile($this->getCorrectUid($share), $fileId);
412 412
 		} catch (\Exception $e) {
413 413
 			throw new ShareNotFound();
@@ -483,7 +483,7 @@  discard block
 block discarded – undo
483 483
 		$this->federatedShareProvider->removeShareFromTable($share);
484 484
 
485 485
 		try {
486
-			$fileId = (int)$share->getNode()->getId();
486
+			$fileId = (int) $share->getNode()->getId();
487 487
 			list($file, $link) = $this->getFile($this->getCorrectUid($share), $fileId);
488 488
 		} catch (\Exception $e) {
489 489
 			throw new ShareNotFound();
@@ -575,10 +575,10 @@  discard block
 block discarded – undo
575 575
 			// delete all child in case of a group share
576 576
 			$qb = $this->connection->getQueryBuilder();
577 577
 			$qb->delete('share_external')
578
-				->where($qb->expr()->eq('parent', $qb->createNamedParameter((int)$share['id'])));
578
+				->where($qb->expr()->eq('parent', $qb->createNamedParameter((int) $share['id'])));
579 579
 			$qb->execute();
580 580
 
581
-			if ((int)$share['share_type'] === IShare::TYPE_USER) {
581
+			if ((int) $share['share_type'] === IShare::TYPE_USER) {
582 582
 				if ($share['accepted']) {
583 583
 					$path = trim($mountpoint, '/');
584 584
 				} else {
@@ -587,7 +587,7 @@  discard block
 block discarded – undo
587 587
 				$notification = $this->notificationManager->createNotification();
588 588
 				$notification->setApp('files_sharing')
589 589
 					->setUser($share['user'])
590
-					->setObject('remote_share', (int)$share['id']);
590
+					->setObject('remote_share', (int) $share['id']);
591 591
 				$this->notificationManager->markProcessed($notification);
592 592
 
593 593
 				$event = $this->activityManager->generateEvent();
@@ -595,7 +595,7 @@  discard block
 block discarded – undo
595 595
 					->setType('remote_share')
596 596
 					->setSubject(RemoteShares::SUBJECT_REMOTE_SHARE_UNSHARED, [$owner->getId(), $path])
597 597
 					->setAffectedUser($user)
598
-					->setObject('remote_share', (int)$share['id'], $path);
598
+					->setObject('remote_share', (int) $share['id'], $path);
599 599
 				\OC::$server->getActivityManager()->publish($event);
600 600
 			}
601 601
 		}
@@ -643,7 +643,7 @@  discard block
 block discarded – undo
643 643
 			$owner = $share->getShareOwner();
644 644
 			$currentServer = $this->addressHandler->generateRemoteURL();
645 645
 			if ($this->addressHandler->compareAddresses($user, $remote, $owner, $currentServer)) {
646
-				throw new ProviderCouldNotAddShareException('Resharing back to the owner is not allowed: ' . $id);
646
+				throw new ProviderCouldNotAddShareException('Resharing back to the owner is not allowed: '.$id);
647 647
 			}
648 648
 		} catch (\Exception $e) {
649 649
 			throw new ProviderCouldNotAddShareException($e->getMessage());
@@ -657,10 +657,10 @@  discard block
 block discarded – undo
657 657
 			$share->setSharedBy($share->getSharedWith());
658 658
 			$share->setSharedWith($shareWith);
659 659
 			$result = $this->federatedShareProvider->create($share);
660
-			$this->federatedShareProvider->storeRemoteId((int)$result->getId(), $senderId);
660
+			$this->federatedShareProvider->storeRemoteId((int) $result->getId(), $senderId);
661 661
 			return ['token' => $result->getToken(), 'providerId' => $result->getId()];
662 662
 		} else {
663
-			throw new ProviderCouldNotAddShareException('resharing not allowed for share: ' . $id);
663
+			throw new ProviderCouldNotAddShareException('resharing not allowed for share: '.$id);
664 664
 		}
665 665
 	}
666 666
 
Please login to merge, or discard this patch.
apps/federatedfilesharing/lib/Notifier.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -104,8 +104,8 @@  discard block
 block discarded – undo
104 104
 				if ($params[0] !== $params[1] && $params[1] !== null) {
105 105
 					$remoteInitiator = $this->createRemoteUser($params[0]);
106 106
 					$remoteOwner = $this->createRemoteUser($params[1]);
107
-					$params[3] = $remoteInitiator['name'] . '@' . $remoteInitiator['server'];
108
-					$params[4] = $remoteOwner['name'] . '@' . $remoteOwner['server'];
107
+					$params[3] = $remoteInitiator['name'].'@'.$remoteInitiator['server'];
108
+					$params[4] = $remoteOwner['name'].'@'.$remoteOwner['server'];
109 109
 
110 110
 					$notification->setParsedSubject(
111 111
 						$l->t('You received "%3$s" as a remote share from %4$s (%1$s) (on behalf of %5$s (%2$s))', $params)
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
 					);
126 126
 				} else {
127 127
 					$remoteOwner = $this->createRemoteUser($params[0]);
128
-					$params[3] = $remoteOwner['name'] . '@' . $remoteOwner['server'];
128
+					$params[3] = $remoteOwner['name'].'@'.$remoteOwner['server'];
129 129
 
130 130
 					$notification->setParsedSubject(
131 131
 						$l->t('You received "%3$s" as a remote share from %4$s (%1$s)', $params)
@@ -150,14 +150,14 @@  discard block
 block discarded – undo
150 150
 					switch ($action->getLabel()) {
151 151
 						case 'accept':
152 152
 							$action->setParsedLabel(
153
-								(string)$l->t('Accept')
153
+								(string) $l->t('Accept')
154 154
 							)
155 155
 								->setPrimary(true);
156 156
 							break;
157 157
 
158 158
 						case 'decline':
159 159
 							$action->setParsedLabel(
160
-								(string)$l->t('Decline')
160
+								(string) $l->t('Decline')
161 161
 							);
162 162
 							break;
163 163
 					}
@@ -226,12 +226,12 @@  discard block
 block discarded – undo
226 226
 		}
227 227
 
228 228
 		try {
229
-			return $this->getDisplayNameFromContact($user . '@http://' . $server);
229
+			return $this->getDisplayNameFromContact($user.'@http://'.$server);
230 230
 		} catch (\OutOfBoundsException $e) {
231 231
 		}
232 232
 
233 233
 		try {
234
-			return $this->getDisplayNameFromContact($user . '@https://' . $server);
234
+			return $this->getDisplayNameFromContact($user.'@https://'.$server);
235 235
 		} catch (\OutOfBoundsException $e) {
236 236
 		}
237 237
 
Please login to merge, or discard this patch.