@@ -150,7 +150,7 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 | } |
@@ -117,7 +117,7 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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'], |
@@ -192,7 +192,7 @@ discard block |
||
192 | 192 | if ($remoteShare) { |
193 | 193 | try { |
194 | 194 | $ownerCloudId = $this->cloudIdManager->getCloudId($remoteShare['owner'], $remoteShare['remote']); |
195 | - $shareId = $this->addShareToDB($itemSource, $itemType, $shareWith, $sharedBy, $ownerCloudId->getId(), $permissions, 'tmp_token_' . time()); |
|
195 | + $shareId = $this->addShareToDB($itemSource, $itemType, $shareWith, $sharedBy, $ownerCloudId->getId(), $permissions, 'tmp_token_'.time()); |
|
196 | 196 | $share->setId($shareId); |
197 | 197 | list($token, $remoteId) = $this->askOwnerToReShare($shareWith, $share, $shareId); |
198 | 198 | // remote share was create successfully if we get a valid token as return |
@@ -272,7 +272,7 @@ discard block |
||
272 | 272 | $failure = true; |
273 | 273 | } |
274 | 274 | |
275 | - if($failure) { |
|
275 | + if ($failure) { |
|
276 | 276 | $this->removeShareFromTableById($shareId); |
277 | 277 | $message_t = $this->l->t('Sharing %s failed, could not find %s, maybe the server is currently unreachable or uses a self-signed certificate.', |
278 | 278 | [$share->getNode()->getName(), $share->getSharedWith()]); |
@@ -324,7 +324,7 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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(); |
@@ -612,7 +612,7 @@ discard block |
||
612 | 612 | ); |
613 | 613 | } |
614 | 614 | |
615 | - $qb->innerJoin('s', 'filecache' ,'f', $qb->expr()->eq('s.file_source', 'f.fileid')); |
|
615 | + $qb->innerJoin('s', 'filecache', 'f', $qb->expr()->eq('s.file_source', 'f.fileid')); |
|
616 | 616 | $qb->andWhere($qb->expr()->eq('f.parent', $qb->createNamedParameter($node->getId()))); |
617 | 617 | |
618 | 618 | $qb->orderBy('id'); |
@@ -675,7 +675,7 @@ discard block |
||
675 | 675 | |
676 | 676 | $cursor = $qb->execute(); |
677 | 677 | $shares = []; |
678 | - while($data = $cursor->fetch()) { |
|
678 | + while ($data = $cursor->fetch()) { |
|
679 | 679 | $shares[] = $this->createShareObject($data); |
680 | 680 | } |
681 | 681 | $cursor->closeCursor(); |
@@ -699,7 +699,7 @@ discard block |
||
699 | 699 | $cursor->closeCursor(); |
700 | 700 | |
701 | 701 | if ($data === false) { |
702 | - throw new ShareNotFound('Can not find share with ID: ' . $id); |
|
702 | + throw new ShareNotFound('Can not find share with ID: '.$id); |
|
703 | 703 | } |
704 | 704 | |
705 | 705 | try { |
@@ -727,7 +727,7 @@ discard block |
||
727 | 727 | ->execute(); |
728 | 728 | |
729 | 729 | $shares = []; |
730 | - while($data = $cursor->fetch()) { |
|
730 | + while ($data = $cursor->fetch()) { |
|
731 | 731 | $shares[] = $this->createShareObject($data); |
732 | 732 | } |
733 | 733 | $cursor->closeCursor(); |
@@ -766,7 +766,7 @@ discard block |
||
766 | 766 | |
767 | 767 | $cursor = $qb->execute(); |
768 | 768 | |
769 | - while($data = $cursor->fetch()) { |
|
769 | + while ($data = $cursor->fetch()) { |
|
770 | 770 | $shares[] = $this->createShareObject($data); |
771 | 771 | } |
772 | 772 | $cursor->closeCursor(); |
@@ -843,15 +843,15 @@ discard block |
||
843 | 843 | private function createShareObject($data) { |
844 | 844 | |
845 | 845 | $share = new Share($this->rootFolder, $this->userManager); |
846 | - $share->setId((int)$data['id']) |
|
847 | - ->setShareType((int)$data['share_type']) |
|
848 | - ->setPermissions((int)$data['permissions']) |
|
846 | + $share->setId((int) $data['id']) |
|
847 | + ->setShareType((int) $data['share_type']) |
|
848 | + ->setPermissions((int) $data['permissions']) |
|
849 | 849 | ->setTarget($data['file_target']) |
850 | - ->setMailSend((bool)$data['mail_send']) |
|
850 | + ->setMailSend((bool) $data['mail_send']) |
|
851 | 851 | ->setToken($data['token']); |
852 | 852 | |
853 | 853 | $shareTime = new \DateTime(); |
854 | - $shareTime->setTimestamp((int)$data['stime']); |
|
854 | + $shareTime->setTimestamp((int) $data['stime']); |
|
855 | 855 | $share->setShareTime($shareTime); |
856 | 856 | $share->setSharedWith($data['share_with']); |
857 | 857 | |
@@ -861,13 +861,13 @@ discard block |
||
861 | 861 | } else { |
862 | 862 | //OLD SHARE |
863 | 863 | $share->setSharedBy($data['uid_owner']); |
864 | - $path = $this->getNode($share->getSharedBy(), (int)$data['file_source']); |
|
864 | + $path = $this->getNode($share->getSharedBy(), (int) $data['file_source']); |
|
865 | 865 | |
866 | 866 | $owner = $path->getOwner(); |
867 | 867 | $share->setShareOwner($owner->getUID()); |
868 | 868 | } |
869 | 869 | |
870 | - $share->setNodeId((int)$data['file_source']); |
|
870 | + $share->setNodeId((int) $data['file_source']); |
|
871 | 871 | $share->setNodeType($data['item_type']); |
872 | 872 | |
873 | 873 | $share->setProviderId($this->identifier()); |
@@ -185,16 +185,16 @@ discard block |
||
185 | 185 | } |
186 | 186 | |
187 | 187 | // FIXME this should be a method in the user management instead |
188 | - $this->logger->debug('shareWith before, ' . $shareWith, ['app' => 'files_sharing']); |
|
188 | + $this->logger->debug('shareWith before, '.$shareWith, ['app' => 'files_sharing']); |
|
189 | 189 | Util::emitHook( |
190 | 190 | '\OCA\Files_Sharing\API\Server2Server', |
191 | 191 | 'preLoginNameUsedAsUserName', |
192 | 192 | array('uid' => &$shareWith) |
193 | 193 | ); |
194 | - $this->logger->debug('shareWith after, ' . $shareWith, ['app' => 'files_sharing']); |
|
194 | + $this->logger->debug('shareWith after, '.$shareWith, ['app' => 'files_sharing']); |
|
195 | 195 | |
196 | 196 | if (!$this->userManager->userExists($shareWith)) { |
197 | - throw new ProviderCouldNotAddShareException('User does not exists', '',Http::STATUS_BAD_REQUEST); |
|
197 | + throw new ProviderCouldNotAddShareException('User does not exists', '', Http::STATUS_BAD_REQUEST); |
|
198 | 198 | } |
199 | 199 | |
200 | 200 | \OC_Util::setupFS($shareWith); |
@@ -220,7 +220,7 @@ discard block |
||
220 | 220 | ->setType('remote_share') |
221 | 221 | ->setSubject(RemoteShares::SUBJECT_REMOTE_SHARE_RECEIVED, [$ownerFederatedId, trim($name, '/')]) |
222 | 222 | ->setAffectedUser($shareWith) |
223 | - ->setObject('remote_share', (int)$shareId, $name); |
|
223 | + ->setObject('remote_share', (int) $shareId, $name); |
|
224 | 224 | \OC::$server->getActivityManager()->publish($event); |
225 | 225 | |
226 | 226 | $notification = $this->notificationManager->createNotification(); |
@@ -232,12 +232,12 @@ discard block |
||
232 | 232 | |
233 | 233 | $declineAction = $notification->createAction(); |
234 | 234 | $declineAction->setLabel('decline') |
235 | - ->setLink($this->urlGenerator->getAbsoluteURL($this->urlGenerator->linkTo('', 'ocs/v2.php/apps/files_sharing/api/v1/remote_shares/pending/' . $shareId)), 'DELETE'); |
|
235 | + ->setLink($this->urlGenerator->getAbsoluteURL($this->urlGenerator->linkTo('', 'ocs/v2.php/apps/files_sharing/api/v1/remote_shares/pending/'.$shareId)), 'DELETE'); |
|
236 | 236 | $notification->addAction($declineAction); |
237 | 237 | |
238 | 238 | $acceptAction = $notification->createAction(); |
239 | 239 | $acceptAction->setLabel('accept') |
240 | - ->setLink($this->urlGenerator->getAbsoluteURL($this->urlGenerator->linkTo('', 'ocs/v2.php/apps/files_sharing/api/v1/remote_shares/pending/' . $shareId)), 'POST'); |
|
240 | + ->setLink($this->urlGenerator->getAbsoluteURL($this->urlGenerator->linkTo('', 'ocs/v2.php/apps/files_sharing/api/v1/remote_shares/pending/'.$shareId)), 'POST'); |
|
241 | 241 | $notification->addAction($acceptAction); |
242 | 242 | |
243 | 243 | $this->notificationManager->notify($notification); |
@@ -249,7 +249,7 @@ discard block |
||
249 | 249 | 'level' => ILogger::ERROR, |
250 | 250 | 'app' => 'files_sharing' |
251 | 251 | ]); |
252 | - throw new ProviderCouldNotAddShareException('internal server error, was not able to add share from ' . $remote, '', HTTP::STATUS_INTERNAL_SERVER_ERROR); |
|
252 | + throw new ProviderCouldNotAddShareException('internal server error, was not able to add share from '.$remote, '', HTTP::STATUS_INTERNAL_SERVER_ERROR); |
|
253 | 253 | } |
254 | 254 | } |
255 | 255 | |
@@ -346,7 +346,7 @@ discard block |
||
346 | 346 | */ |
347 | 347 | protected function executeAcceptShare(IShare $share) { |
348 | 348 | try { |
349 | - $fileId = (int)$share->getNode()->getId(); |
|
349 | + $fileId = (int) $share->getNode()->getId(); |
|
350 | 350 | list($file, $link) = $this->getFile($this->getCorrectUid($share), $fileId); |
351 | 351 | } catch (\Exception $e) { |
352 | 352 | throw new ShareNotFound(); |
@@ -424,7 +424,7 @@ discard block |
||
424 | 424 | $this->federatedShareProvider->removeShareFromTable($share); |
425 | 425 | |
426 | 426 | try { |
427 | - $fileId = (int)$share->getNode()->getId(); |
|
427 | + $fileId = (int) $share->getNode()->getId(); |
|
428 | 428 | list($file, $link) = $this->getFile($this->getCorrectUid($share), $fileId); |
429 | 429 | } catch (\Exception $e) { |
430 | 430 | throw new ShareNotFound(); |
@@ -525,7 +525,7 @@ discard block |
||
525 | 525 | $notification = $this->notificationManager->createNotification(); |
526 | 526 | $notification->setApp('files_sharing') |
527 | 527 | ->setUser($share['user']) |
528 | - ->setObject('remote_share', (int)$share['id']); |
|
528 | + ->setObject('remote_share', (int) $share['id']); |
|
529 | 529 | $this->notificationManager->markProcessed($notification); |
530 | 530 | |
531 | 531 | $event = $this->activityManager->generateEvent(); |
@@ -533,7 +533,7 @@ discard block |
||
533 | 533 | ->setType('remote_share') |
534 | 534 | ->setSubject(RemoteShares::SUBJECT_REMOTE_SHARE_UNSHARED, [$owner->getId(), $path]) |
535 | 535 | ->setAffectedUser($user) |
536 | - ->setObject('remote_share', (int)$share['id'], $path); |
|
536 | + ->setObject('remote_share', (int) $share['id'], $path); |
|
537 | 537 | \OC::$server->getActivityManager()->publish($event); |
538 | 538 | } |
539 | 539 | |
@@ -581,7 +581,7 @@ discard block |
||
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 |
||
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 | } |
@@ -644,7 +644,7 @@ discard block |
||
644 | 644 | */ |
645 | 645 | protected function ocmPermissions2ncPermissions(array $ocmPermissions) { |
646 | 646 | $ncPermissions = 0; |
647 | - foreach($ocmPermissions as $permission) { |
|
647 | + foreach ($ocmPermissions as $permission) { |
|
648 | 648 | switch (strtolower($permission)) { |
649 | 649 | case 'read': |
650 | 650 | $ncPermissions += Constants::PERMISSION_READ; |
@@ -659,7 +659,7 @@ discard block |
||
659 | 659 | throw new BadRequestException(['permission']); |
660 | 660 | } |
661 | 661 | |
662 | - error_log("new permissions: " . $ncPermissions); |
|
662 | + error_log("new permissions: ".$ncPermissions); |
|
663 | 663 | } |
664 | 664 | |
665 | 665 | return $ncPermissions; |
@@ -145,7 +145,7 @@ discard block |
||
145 | 145 | $owner = isset($_POST['owner']) ? $_POST['owner'] : null; |
146 | 146 | $sharedBy = isset($_POST['sharedBy']) ? $_POST['sharedBy'] : null; |
147 | 147 | $shareWith = isset($_POST['shareWith']) ? $_POST['shareWith'] : null; |
148 | - $remoteId = isset($_POST['remoteId']) ? (int)$_POST['remoteId'] : null; |
|
148 | + $remoteId = isset($_POST['remoteId']) ? (int) $_POST['remoteId'] : null; |
|
149 | 149 | $sharedByFederatedId = isset($_POST['sharedByFederatedId']) ? $_POST['sharedByFederatedId'] : null; |
150 | 150 | $ownerFederatedId = isset($_POST['ownerFederatedId']) ? $_POST['ownerFederatedId'] : null; |
151 | 151 | |
@@ -180,7 +180,7 @@ discard block |
||
180 | 180 | } catch (ProviderCouldNotAddShareException $e) { |
181 | 181 | throw new OCSException($e->getMessage(), 400); |
182 | 182 | } catch (\Exception $e) { |
183 | - throw new OCSException('internal server error, was not able to add share from ' . $remote, 500); |
|
183 | + throw new OCSException('internal server error, was not able to add share from '.$remote, 500); |
|
184 | 184 | } |
185 | 185 | |
186 | 186 | return new Http\DataResponse(); |
@@ -202,8 +202,8 @@ discard block |
||
202 | 202 | |
203 | 203 | $token = $this->request->getParam('token', null); |
204 | 204 | $shareWith = $this->request->getParam('shareWith', null); |
205 | - $permission = (int)$this->request->getParam('permission', null); |
|
206 | - $remoteId = (int)$this->request->getParam('remoteId', null); |
|
205 | + $permission = (int) $this->request->getParam('permission', null); |
|
206 | + $remoteId = (int) $this->request->getParam('remoteId', null); |
|
207 | 207 | |
208 | 208 | if ($id === null || |
209 | 209 | $token === null || |
@@ -231,9 +231,9 @@ discard block |
||
231 | 231 | } catch (ProviderDoesNotExistsException $e) { |
232 | 232 | throw new OCSException('Server does not support federated cloud sharing', 503); |
233 | 233 | } catch (ShareNotFound $e) { |
234 | - $this->logger->debug('Share not found: ' . $e->getMessage()); |
|
234 | + $this->logger->debug('Share not found: '.$e->getMessage()); |
|
235 | 235 | } catch (\Exception $e) { |
236 | - $this->logger->debug('internal server error, can not process notification: ' . $e->getMessage()); |
|
236 | + $this->logger->debug('internal server error, can not process notification: '.$e->getMessage()); |
|
237 | 237 | } |
238 | 238 | |
239 | 239 | throw new OCSBadRequestException(); |
@@ -267,9 +267,9 @@ discard block |
||
267 | 267 | } catch (ProviderDoesNotExistsException $e) { |
268 | 268 | throw new OCSException('Server does not support federated cloud sharing', 503); |
269 | 269 | } catch (ShareNotFound $e) { |
270 | - $this->logger->debug('Share not found: ' . $e->getMessage()); |
|
270 | + $this->logger->debug('Share not found: '.$e->getMessage()); |
|
271 | 271 | } catch (\Exception $e) { |
272 | - $this->logger->debug('internal server error, can not process notification: ' . $e->getMessage()); |
|
272 | + $this->logger->debug('internal server error, can not process notification: '.$e->getMessage()); |
|
273 | 273 | } |
274 | 274 | |
275 | 275 | return new Http\DataResponse(); |
@@ -300,9 +300,9 @@ discard block |
||
300 | 300 | } catch (ProviderDoesNotExistsException $e) { |
301 | 301 | throw new OCSException('Server does not support federated cloud sharing', 503); |
302 | 302 | } catch (ShareNotFound $e) { |
303 | - $this->logger->debug('Share not found: ' . $e->getMessage()); |
|
303 | + $this->logger->debug('Share not found: '.$e->getMessage()); |
|
304 | 304 | } catch (\Exception $e) { |
305 | - $this->logger->debug('internal server error, can not process notification: ' . $e->getMessage()); |
|
305 | + $this->logger->debug('internal server error, can not process notification: '.$e->getMessage()); |
|
306 | 306 | } |
307 | 307 | |
308 | 308 | return new Http\DataResponse(); |
@@ -331,7 +331,7 @@ discard block |
||
331 | 331 | $notification = ['sharedSecret' => $token]; |
332 | 332 | $provider->notificationReceived('SHARE_UNSHARED', $id, $notification); |
333 | 333 | } catch (\Exception $e) { |
334 | - $this->logger->debug('processing unshare notification failed: ' . $e->getMessage()); |
|
334 | + $this->logger->debug('processing unshare notification failed: '.$e->getMessage()); |
|
335 | 335 | } |
336 | 336 | |
337 | 337 | return new Http\DataResponse(); |
@@ -404,7 +404,7 @@ discard block |
||
404 | 404 | |
405 | 405 | try { |
406 | 406 | $provider = $this->cloudFederationProviderManager->getCloudFederationProvider('file'); |
407 | - $ocmPermissions = $this->ncPermissions2ocmPermissions((int)$ncPermissions); |
|
407 | + $ocmPermissions = $this->ncPermissions2ocmPermissions((int) $ncPermissions); |
|
408 | 408 | $notification = ['sharedSecret' => $token, 'permission' => $ocmPermissions]; |
409 | 409 | $provider->notificationReceived('RESHARE_CHANGE_PERMISSION', $id, $notification); |
410 | 410 | } catch (\Exception $e) { |