Completed
Pull Request — master (#9345)
by Björn
21:23
created
apps/federatedfilesharing/lib/FederatedShareProvider.php 1 patch
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -193,7 +193,7 @@  discard block
 block discarded – undo
193 193
 		if ($remoteShare) {
194 194
 			try {
195 195
 				$ownerCloudId = $this->cloudIdManager->getCloudId($remoteShare['owner'], $remoteShare['remote']);
196
-				$shareId = $this->addShareToDB($itemSource, $itemType, $shareWith, $sharedBy, $ownerCloudId->getId(), $permissions, 'tmp_token_' . time());
196
+				$shareId = $this->addShareToDB($itemSource, $itemType, $shareWith, $sharedBy, $ownerCloudId->getId(), $permissions, 'tmp_token_'.time());
197 197
 				$share->setId($shareId);
198 198
 				list($token, $remoteId) = $this->askOwnerToReShare($shareWith, $share, $shareId);
199 199
 				// remote share was create successfully if we get a valid token as return
@@ -273,7 +273,7 @@  discard block
 block discarded – undo
273 273
 			$failure = true;
274 274
 		}
275 275
 
276
-		if($failure) {
276
+		if ($failure) {
277 277
 			$this->removeShareFromTableById($shareId);
278 278
 			$message_t = $this->l->t('Sharing %s failed, could not find %s, maybe the server is currently unreachable or uses a self-signed certificate.',
279 279
 				[$share->getNode()->getName(), $share->getSharedWith()]);
@@ -324,7 +324,7 @@  discard block
 block discarded – undo
324 324
 			->andWhere($query->expr()->eq('mountpoint', $query->createNamedParameter($share->getTarget())));
325 325
 		$result = $query->execute()->fetchAll();
326 326
 
327
-		if (isset($result[0]) && (int)$result[0]['remote_id'] > 0) {
327
+		if (isset($result[0]) && (int) $result[0]['remote_id'] > 0) {
328 328
 			return $result[0];
329 329
 		}
330 330
 
@@ -366,7 +366,7 @@  discard block
 block discarded – undo
366 366
 		$qb->execute();
367 367
 		$id = $qb->getLastInsertId();
368 368
 
369
-		return (int)$id;
369
+		return (int) $id;
370 370
 	}
371 371
 
372 372
 	/**
@@ -456,14 +456,14 @@  discard block
 block discarded – undo
456 456
 	public function getRemoteId(IShare $share) {
457 457
 		$query = $this->dbConnection->getQueryBuilder();
458 458
 		$query->select('remote_id')->from('federated_reshares')
459
-			->where($query->expr()->eq('share_id', $query->createNamedParameter((int)$share->getId())));
459
+			->where($query->expr()->eq('share_id', $query->createNamedParameter((int) $share->getId())));
460 460
 		$data = $query->execute()->fetch();
461 461
 
462 462
 		if (!is_array($data) || !isset($data['remote_id'])) {
463 463
 			throw new ShareNotFound();
464 464
 		}
465 465
 
466
-		return (int)$data['remote_id'];
466
+		return (int) $data['remote_id'];
467 467
 	}
468 468
 
469 469
 	/**
@@ -494,7 +494,7 @@  discard block
 block discarded – undo
494 494
 			->orderBy('id');
495 495
 
496 496
 		$cursor = $qb->execute();
497
-		while($data = $cursor->fetch()) {
497
+		while ($data = $cursor->fetch()) {
498 498
 			$children[] = $this->createShareObject($data);
499 499
 		}
500 500
 		$cursor->closeCursor();
@@ -622,7 +622,7 @@  discard block
 block discarded – undo
622 622
 			);
623 623
 		}
624 624
 
625
-		$qb->innerJoin('s', 'filecache' ,'f', $qb->expr()->eq('s.file_source', 'f.fileid'));
625
+		$qb->innerJoin('s', 'filecache', 'f', $qb->expr()->eq('s.file_source', 'f.fileid'));
626 626
 		$qb->andWhere($qb->expr()->eq('f.parent', $qb->createNamedParameter($node->getId())));
627 627
 
628 628
 		$qb->orderBy('id');
@@ -685,7 +685,7 @@  discard block
 block discarded – undo
685 685
 
686 686
 		$cursor = $qb->execute();
687 687
 		$shares = [];
688
-		while($data = $cursor->fetch()) {
688
+		while ($data = $cursor->fetch()) {
689 689
 			$shares[] = $this->createShareObject($data);
690 690
 		}
691 691
 		$cursor->closeCursor();
@@ -709,7 +709,7 @@  discard block
 block discarded – undo
709 709
 		$cursor->closeCursor();
710 710
 
711 711
 		if ($data === false) {
712
-			throw new ShareNotFoundException('Can not find share with ID: ' . $id);
712
+			throw new ShareNotFoundException('Can not find share with ID: '.$id);
713 713
 		}
714 714
 
715 715
 		try {
@@ -737,7 +737,7 @@  discard block
 block discarded – undo
737 737
 			->execute();
738 738
 
739 739
 		$shares = [];
740
-		while($data = $cursor->fetch()) {
740
+		while ($data = $cursor->fetch()) {
741 741
 			$shares[] = $this->createShareObject($data);
742 742
 		}
743 743
 		$cursor->closeCursor();
@@ -776,7 +776,7 @@  discard block
 block discarded – undo
776 776
 
777 777
 		$cursor = $qb->execute();
778 778
 
779
-		while($data = $cursor->fetch()) {
779
+		while ($data = $cursor->fetch()) {
780 780
 			$shares[] = $this->createShareObject($data);
781 781
 		}
782 782
 		$cursor->closeCursor();
@@ -853,15 +853,15 @@  discard block
 block discarded – undo
853 853
 	private function createShareObject($data) {
854 854
 
855 855
 		$share = new Share($this->rootFolder, $this->userManager);
856
-		$share->setId((int)$data['id'])
857
-			->setShareType((int)$data['share_type'])
858
-			->setPermissions((int)$data['permissions'])
856
+		$share->setId((int) $data['id'])
857
+			->setShareType((int) $data['share_type'])
858
+			->setPermissions((int) $data['permissions'])
859 859
 			->setTarget($data['file_target'])
860
-			->setMailSend((bool)$data['mail_send'])
860
+			->setMailSend((bool) $data['mail_send'])
861 861
 			->setToken($data['token']);
862 862
 
863 863
 		$shareTime = new \DateTime();
864
-		$shareTime->setTimestamp((int)$data['stime']);
864
+		$shareTime->setTimestamp((int) $data['stime']);
865 865
 		$share->setShareTime($shareTime);
866 866
 		$share->setSharedWith($data['share_with']);
867 867
 
@@ -871,13 +871,13 @@  discard block
 block discarded – undo
871 871
 		} else {
872 872
 			//OLD SHARE
873 873
 			$share->setSharedBy($data['uid_owner']);
874
-			$path = $this->getNode($share->getSharedBy(), (int)$data['file_source']);
874
+			$path = $this->getNode($share->getSharedBy(), (int) $data['file_source']);
875 875
 
876 876
 			$owner = $path->getOwner();
877 877
 			$share->setShareOwner($owner->getUID());
878 878
 		}
879 879
 
880
-		$share->setNodeId((int)$data['file_source']);
880
+		$share->setNodeId((int) $data['file_source']);
881 881
 		$share->setNodeType($data['item_type']);
882 882
 
883 883
 		$share->setProviderId($this->identifier());
Please login to merge, or discard this patch.
apps/cloud_federation_api/lib/Controller/RequestHandlerController.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
 
151 151
 		if (!$this->userManager->userExists($shareWith)) {
152 152
 			return new JSONResponse(
153
-				['message' => 'User "' . $shareWith . '" does not exists at ' . $this->urlGenerator->getBaseUrl()],
153
+				['message' => 'User "'.$shareWith.'" does not exists at '.$this->urlGenerator->getBaseUrl()],
154 154
 				Http::STATUS_BAD_REQUEST
155 155
 			);
156 156
 		}
@@ -182,7 +182,7 @@  discard block
 block discarded – undo
182 182
 			);
183 183
 		} catch (\Exception $e) {
184 184
 			return new JSONResponse(
185
-				['message' => 'Internal error at ' . $this->urlGenerator->getBaseUrl()],
185
+				['message' => 'Internal error at '.$this->urlGenerator->getBaseUrl()],
186 186
 				Http::STATUS_BAD_REQUEST
187 187
 			);
188 188
 		}
@@ -251,12 +251,12 @@  discard block
 block discarded – undo
251 251
 		}
252 252
 		catch (\Exception $e) {
253 253
 			return new JSONResponse(
254
-				['message' => 'Internal error at ' . $this->urlGenerator->getBaseUrl()],
254
+				['message' => 'Internal error at '.$this->urlGenerator->getBaseUrl()],
255 255
 				Http::STATUS_BAD_REQUEST
256 256
 			);
257 257
 		}
258 258
 
259
-		return new JSONResponse($result,Http::STATUS_CREATED);
259
+		return new JSONResponse($result, Http::STATUS_CREATED);
260 260
 
261 261
 	}
262 262
 
@@ -269,13 +269,13 @@  discard block
 block discarded – undo
269 269
 	private function mapUid($uid) {
270 270
 		\OC::$server->getURLGenerator()->linkToDocs('key');
271 271
 		// FIXME this should be a method in the user management instead
272
-		$this->logger->debug('shareWith before, ' . $uid, ['app' => $this->appName]);
272
+		$this->logger->debug('shareWith before, '.$uid, ['app' => $this->appName]);
273 273
 		\OCP\Util::emitHook(
274 274
 			'\OCA\Files_Sharing\API\Server2Server',
275 275
 			'preLoginNameUsedAsUserName',
276 276
 			array('uid' => &$uid)
277 277
 		);
278
-		$this->logger->debug('shareWith after, ' . $uid, ['app' => $this->appName]);
278
+		$this->logger->debug('shareWith after, '.$uid, ['app' => $this->appName]);
279 279
 
280 280
 		return $uid;
281 281
 	}
Please login to merge, or discard this patch.
apps/federatedfilesharing/lib/Notifications.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
 			$ocsStatus = isset($status['ocs']);
118 118
 			$ocsSuccess = $ocsStatus && ($status['ocs']['meta']['statuscode'] === 100 || $status['ocs']['meta']['statuscode'] === 200);
119 119
 
120
-			if ($result['success'] && (!$ocsStatus ||$ocsSuccess)) {
120
+			if ($result['success'] && (!$ocsStatus || $ocsSuccess)) {
121 121
 				\OC_Hook::emit('OCP\Share', 'federated_share_added', ['server' => $remote]);
122 122
 				return true;
123 123
 			}
@@ -160,7 +160,7 @@  discard block
 block discarded – undo
160 160
 			return [$ocmResult['token'], $ocmResult['providerId']];
161 161
 		}
162 162
 
163
-		$result = $this->tryLegacyEndPoint(rtrim($remote, '/'), '/' . $id . '/reshare', $fields);
163
+		$result = $this->tryLegacyEndPoint(rtrim($remote, '/'), '/'.$id.'/reshare', $fields);
164 164
 		$status = json_decode($result['result'], true);
165 165
 
166 166
 		$httpRequestSuccessful = $result['success'];
@@ -171,7 +171,7 @@  discard block
 block discarded – undo
171 171
 		if ($httpRequestSuccessful && $ocsCallSuccessful && $validToken && $validRemoteId) {
172 172
 			return [
173 173
 				$status['ocs']['data']['token'],
174
-				(int)$status['ocs']['data']['remoteId']
174
+				(int) $status['ocs']['data']['remoteId']
175 175
 			];
176 176
 		}
177 177
 
@@ -258,7 +258,7 @@  discard block
 block discarded – undo
258 258
 			$fields[$key] = $value;
259 259
 		}
260 260
 
261
-		$result = $this->tryHttpPostToShareEndpoint(rtrim($remote, '/'), '/' . $remoteId . '/' . $action, $fields, $action);
261
+		$result = $this->tryHttpPostToShareEndpoint(rtrim($remote, '/'), '/'.$remoteId.'/'.$action, $fields, $action);
262 262
 		$status = json_decode($result['result'], true);
263 263
 
264 264
 		if ($result['success'] &&
@@ -306,10 +306,10 @@  discard block
 block discarded – undo
306 306
 	 * @return array
307 307
 	 * @throws \Exception
308 308
 	 */
309
-	protected function tryHttpPostToShareEndpoint($remoteDomain, $urlSuffix, array $fields, $action="share") {
309
+	protected function tryHttpPostToShareEndpoint($remoteDomain, $urlSuffix, array $fields, $action = "share") {
310 310
 
311 311
 		if ($this->addressHandler->urlContainProtocol($remoteDomain) === false) {
312
-			$remoteDomain = 'https://' . $remoteDomain;
312
+			$remoteDomain = 'https://'.$remoteDomain;
313 313
 		}
314 314
 
315 315
 		$result = [
@@ -348,7 +348,7 @@  discard block
 block discarded – undo
348 348
 		$federationEndpoints = $this->discoveryService->discover($remoteDomain, 'FEDERATED_SHARING');
349 349
 		$endpoint = isset($federationEndpoints['share']) ? $federationEndpoints['share'] : '/ocs/v2.php/cloud/shares';
350 350
 		try {
351
-			$response = $client->post($remoteDomain . $endpoint . $urlSuffix . '?format=' . self::RESPONSE_FORMAT, [
351
+			$response = $client->post($remoteDomain.$endpoint.$urlSuffix.'?format='.self::RESPONSE_FORMAT, [
352 352
 				'body' => $fields,
353 353
 				'timeout' => 10,
354 354
 				'connect_timeout' => 10,
@@ -405,7 +405,7 @@  discard block
 block discarded – undo
405 405
 		switch ($action) {
406 406
 			case 'share':
407 407
 				$share = $this->cloudFederationFactory->getCloudFederationShare(
408
-					$fields['shareWith'] . '@' . $remoteDomain,
408
+					$fields['shareWith'].'@'.$remoteDomain,
409 409
 					$fields['name'],
410 410
 					'',
411 411
 					$fields['remoteId'],
Please login to merge, or discard this patch.
apps/federatedfilesharing/lib/ocm/CloudFederationProviderFiles.php 1 patch
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -189,16 +189,16 @@  discard block
 block discarded – undo
189 189
 			}
190 190
 
191 191
 			// FIXME this should be a method in the user management instead
192
-			$this->logger->debug('shareWith before, ' . $shareWith, ['app' => 'files_sharing']);
192
+			$this->logger->debug('shareWith before, '.$shareWith, ['app' => 'files_sharing']);
193 193
 			Util::emitHook(
194 194
 				'\OCA\Files_Sharing\API\Server2Server',
195 195
 				'preLoginNameUsedAsUserName',
196 196
 				array('uid' => &$shareWith)
197 197
 			);
198
-			$this->logger->debug('shareWith after, ' . $shareWith, ['app' => 'files_sharing']);
198
+			$this->logger->debug('shareWith after, '.$shareWith, ['app' => 'files_sharing']);
199 199
 
200 200
 			if (!$this->userManager->userExists($shareWith)) {
201
-				throw new ProviderCouldNotAddShareException('User does not exists', '',Http::STATUS_BAD_REQUEST);
201
+				throw new ProviderCouldNotAddShareException('User does not exists', '', Http::STATUS_BAD_REQUEST);
202 202
 			}
203 203
 
204 204
 			\OC_Util::setupFS($shareWith);
@@ -224,7 +224,7 @@  discard block
 block discarded – undo
224 224
 					->setType('remote_share')
225 225
 					->setSubject(RemoteShares::SUBJECT_REMOTE_SHARE_RECEIVED, [$ownerFederatedId, trim($name, '/')])
226 226
 					->setAffectedUser($shareWith)
227
-					->setObject('remote_share', (int)$shareId, $name);
227
+					->setObject('remote_share', (int) $shareId, $name);
228 228
 				\OC::$server->getActivityManager()->publish($event);
229 229
 
230 230
 				$notification = $this->notificationManager->createNotification();
@@ -236,12 +236,12 @@  discard block
 block discarded – undo
236 236
 
237 237
 				$declineAction = $notification->createAction();
238 238
 				$declineAction->setLabel('decline')
239
-					->setLink($this->urlGenerator->getAbsoluteURL($this->urlGenerator->linkTo('', 'ocs/v2.php/apps/files_sharing/api/v1/remote_shares/pending/' . $shareId)), 'DELETE');
239
+					->setLink($this->urlGenerator->getAbsoluteURL($this->urlGenerator->linkTo('', 'ocs/v2.php/apps/files_sharing/api/v1/remote_shares/pending/'.$shareId)), 'DELETE');
240 240
 				$notification->addAction($declineAction);
241 241
 
242 242
 				$acceptAction = $notification->createAction();
243 243
 				$acceptAction->setLabel('accept')
244
-					->setLink($this->urlGenerator->getAbsoluteURL($this->urlGenerator->linkTo('', 'ocs/v2.php/apps/files_sharing/api/v1/remote_shares/pending/' . $shareId)), 'POST');
244
+					->setLink($this->urlGenerator->getAbsoluteURL($this->urlGenerator->linkTo('', 'ocs/v2.php/apps/files_sharing/api/v1/remote_shares/pending/'.$shareId)), 'POST');
245 245
 				$notification->addAction($acceptAction);
246 246
 
247 247
 				$this->notificationManager->notify($notification);
@@ -253,7 +253,7 @@  discard block
 block discarded – undo
253 253
 					'level' => Util::ERROR,
254 254
 					'app' => 'files_sharing'
255 255
 				]);
256
-				throw new ProviderCouldNotAddShareException('internal server error, was not able to add share from ' . $remote, '', HTTP::STATUS_INTERNAL_SERVER_ERROR);
256
+				throw new ProviderCouldNotAddShareException('internal server error, was not able to add share from '.$remote, '', HTTP::STATUS_INTERNAL_SERVER_ERROR);
257 257
 			}
258 258
 		}
259 259
 
@@ -352,7 +352,7 @@  discard block
 block discarded – undo
352 352
 	 */
353 353
 	protected function executeAcceptShare(IShare $share) {
354 354
 		try {
355
-			$fileId = (int)$share->getNode()->getId();
355
+			$fileId = (int) $share->getNode()->getId();
356 356
 			list($file, $link) = $this->getFile($this->getCorrectUid($share), $fileId);
357 357
 		} catch (\Exception $e) {
358 358
 			throw new ShareNotFoundException();
@@ -431,7 +431,7 @@  discard block
 block discarded – undo
431 431
 		$this->federatedShareProvider->removeShareFromTable($share);
432 432
 
433 433
 		try {
434
-			$fileId = (int)$share->getNode()->getId();
434
+			$fileId = (int) $share->getNode()->getId();
435 435
 			list($file, $link) = $this->getFile($this->getCorrectUid($share), $fileId);
436 436
 		} catch (\Exception $e) {
437 437
 			throw new ShareNotFoundException();
@@ -524,7 +524,7 @@  discard block
 block discarded – undo
524 524
 			$notification = $this->notificationManager->createNotification();
525 525
 			$notification->setApp('files_sharing')
526 526
 				->setUser($share['user'])
527
-				->setObject('remote_share', (int)$share['id']);
527
+				->setObject('remote_share', (int) $share['id']);
528 528
 			$this->notificationManager->markProcessed($notification);
529 529
 
530 530
 			$event = $this->activityManager->generateEvent();
@@ -532,7 +532,7 @@  discard block
 block discarded – undo
532 532
 				->setType('remote_share')
533 533
 				->setSubject(RemoteShares::SUBJECT_REMOTE_SHARE_UNSHARED, [$owner->getId(), $path])
534 534
 				->setAffectedUser($user)
535
-				->setObject('remote_share', (int)$share['id'], $path);
535
+				->setObject('remote_share', (int) $share['id'], $path);
536 536
 			\OC::$server->getActivityManager()->publish($event);
537 537
 		}
538 538
 
@@ -581,7 +581,7 @@  discard block
 block discarded – undo
581 581
 			$owner = $share->getShareOwner();
582 582
 			$currentServer = $this->addressHandler->generateRemoteURL();
583 583
 			if ($this->addressHandler->compareAddresses($user, $remote, $owner, $currentServer)) {
584
-				throw new ProviderCouldNotAddShareException('Resharing back to the owner is not allowed: ' . $id);
584
+				throw new ProviderCouldNotAddShareException('Resharing back to the owner is not allowed: '.$id);
585 585
 			}
586 586
 		} catch (\Exception $e) {
587 587
 			throw new ProviderCouldNotAddShareException($e->getMessage());
@@ -595,10 +595,10 @@  discard block
 block discarded – undo
595 595
 			$share->setSharedBy($share->getSharedWith());
596 596
 			$share->setSharedWith($shareWith);
597 597
 			$result = $this->federatedShareProvider->create($share);
598
-			$this->federatedShareProvider->storeRemoteId((int)$result->getId(), $senderId);
598
+			$this->federatedShareProvider->storeRemoteId((int) $result->getId(), $senderId);
599 599
 			return ['token' => $result->getToken(), 'providerId' => $result->getId()];
600 600
 		} else {
601
-			throw new ProviderCouldNotAddShareException('resharing not allowed for share: ' . $id);
601
+			throw new ProviderCouldNotAddShareException('resharing not allowed for share: '.$id);
602 602
 		}
603 603
 
604 604
 		throw new BadRequestException([]);
@@ -645,9 +645,9 @@  discard block
 block discarded – undo
645 645
 	 * @throws BadRequestException
646 646
 	 */
647 647
 	protected function ocmPermissions2ncPermissions($ocmPermissions) {
648
-		error_log("ocm permissions: " . json_encode($ocmPermissions));
648
+		error_log("ocm permissions: ".json_encode($ocmPermissions));
649 649
 		$ncPermissions = 0;
650
-		foreach($ocmPermissions as $permission) {
650
+		foreach ($ocmPermissions as $permission) {
651 651
 			switch (strtolower($permission)) {
652 652
 				case 'read':
653 653
 					$ncPermissions += Constants::PERMISSION_READ;
@@ -662,7 +662,7 @@  discard block
 block discarded – undo
662 662
 					throw new BadRequestException(['permission']);
663 663
 			}
664 664
 
665
-			error_log("new permissions: " . $ncPermissions);
665
+			error_log("new permissions: ".$ncPermissions);
666 666
 		}
667 667
 
668 668
 		return $ncPermissions;
Please login to merge, or discard this patch.
apps/federatedfilesharing/lib/Controller/RequestHandlerController.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
 		$owner = isset($_POST['owner']) ? $_POST['owner'] : null;
152 152
 		$sharedBy = isset($_POST['sharedBy']) ? $_POST['sharedBy'] : null;
153 153
 		$shareWith = isset($_POST['shareWith']) ? $_POST['shareWith'] : null;
154
-		$remoteId = isset($_POST['remoteId']) ? (int)$_POST['remoteId'] : null;
154
+		$remoteId = isset($_POST['remoteId']) ? (int) $_POST['remoteId'] : null;
155 155
 		$sharedByFederatedId = isset($_POST['sharedByFederatedId']) ? $_POST['sharedByFederatedId'] : null;
156 156
 		$ownerFederatedId = isset($_POST['ownerFederatedId']) ? $_POST['ownerFederatedId'] : null;
157 157
 
@@ -186,7 +186,7 @@  discard block
 block discarded – undo
186 186
 		} catch (ProviderCouldNotAddShareException $e) {
187 187
 			throw new OCSException($e->getMessage(), $e->getCode());
188 188
 		} catch (\Exception $e) {
189
-			throw new OCSException('internal server error, was not able to add share from ' . $remote, 500);
189
+			throw new OCSException('internal server error, was not able to add share from '.$remote, 500);
190 190
 		}
191 191
 
192 192
 		return new Http\DataResponse();
@@ -208,8 +208,8 @@  discard block
 block discarded – undo
208 208
 
209 209
 		$token = $this->request->getParam('token', null);
210 210
 		$shareWith = $this->request->getParam('shareWith', null);
211
-		$permission = (int)$this->request->getParam('permission', null);
212
-		$remoteId = (int)$this->request->getParam('remoteId', null);
211
+		$permission = (int) $this->request->getParam('permission', null);
212
+		$remoteId = (int) $this->request->getParam('remoteId', null);
213 213
 
214 214
 		if ($id === null ||
215 215
 			$token === null ||
@@ -237,12 +237,12 @@  discard block
 block discarded – undo
237 237
 		} catch (ProviderDoesNotExistsException $e) {
238 238
 			throw new OCSException('Server does not support federated cloud sharing', 503);
239 239
 		} catch (ShareNotFoundException $e) {
240
-			$this->logger->debug('Share not found: ' . $e->getMessage());
240
+			$this->logger->debug('Share not found: '.$e->getMessage());
241 241
 		} catch (ProviderCouldNotAddShareException $e) {
242
-			$this->logger->debug('Could not add reshare: ' . $e->getMessage());
242
+			$this->logger->debug('Could not add reshare: '.$e->getMessage());
243 243
 			throw new OCSForbiddenException();
244 244
 		} catch (\Exception $e) {
245
-			$this->logger->debug('internal server error, can not process notification: ' . $e->getMessage());
245
+			$this->logger->debug('internal server error, can not process notification: '.$e->getMessage());
246 246
 		}
247 247
 
248 248
 		throw new OCSBadRequestException();
@@ -276,9 +276,9 @@  discard block
 block discarded – undo
276 276
 		} catch (ProviderDoesNotExistsException $e) {
277 277
 			throw new OCSException('Server does not support federated cloud sharing', 503);
278 278
 		} catch (ShareNotFoundException $e) {
279
-			$this->logger->debug('Share not found: ' . $e->getMessage());
279
+			$this->logger->debug('Share not found: '.$e->getMessage());
280 280
 		} catch (\Exception $e) {
281
-			$this->logger->debug('internal server error, can not process notification: ' . $e->getMessage());
281
+			$this->logger->debug('internal server error, can not process notification: '.$e->getMessage());
282 282
 		}
283 283
 
284 284
 		return new Http\DataResponse();
@@ -309,9 +309,9 @@  discard block
 block discarded – undo
309 309
 		} catch (ProviderDoesNotExistsException $e) {
310 310
 			throw new OCSException('Server does not support federated cloud sharing', 503);
311 311
 		} catch (ShareNotFoundException $e) {
312
-			$this->logger->debug('Share not found: ' . $e->getMessage());
312
+			$this->logger->debug('Share not found: '.$e->getMessage());
313 313
 		} catch (\Exception $e) {
314
-			$this->logger->debug('internal server error, can not process notification: ' . $e->getMessage());
314
+			$this->logger->debug('internal server error, can not process notification: '.$e->getMessage());
315 315
 		}
316 316
 
317 317
 		return new Http\DataResponse();
@@ -340,7 +340,7 @@  discard block
 block discarded – undo
340 340
 			$notification = ['sharedSecret' => $token];
341 341
 			$provider->notificationReceived('SHARE_UNSHARED', $id, $notification);
342 342
 		} catch (\Exception $e) {
343
-			$this->logger->debug('processing unshare notification failed: ' . $e->getMessage());
343
+			$this->logger->debug('processing unshare notification failed: '.$e->getMessage());
344 344
 		}
345 345
 
346 346
 		return new Http\DataResponse();
@@ -436,7 +436,7 @@  discard block
 block discarded – undo
436 436
 
437 437
 		try {
438 438
 			$provider = $this->cloudFederationProviderManager->getCloudFederationProvider('file');
439
-			$ocmPermissions = $this->ncPermissions2ocmPermissions((int)$ncPermissions);
439
+			$ocmPermissions = $this->ncPermissions2ocmPermissions((int) $ncPermissions);
440 440
 			$notification = ['sharedSecret' => $token, 'permission' => $ocmPermissions];
441 441
 			$provider->notificationReceived('RESHARE_CHANGE_PERMISSION', $id, $notification);
442 442
 		} catch (\Exception $e) {
Please login to merge, or discard this patch.