@@ -177,7 +177,7 @@ discard block |
||
177 | 177 | $this->sendMailExistingShares($template, $author, $recipient); |
178 | 178 | $this->sendPasswordExistingShares($author, $recipient, $password); |
179 | 179 | } catch (Exception $e) { |
180 | - $this->miscService->log('Failed to send mail about existing share ' . $e->getMessage()); |
|
180 | + $this->miscService->log('Failed to send mail about existing share '.$e->getMessage()); |
|
181 | 181 | } |
182 | 182 | } |
183 | 183 | |
@@ -327,7 +327,7 @@ discard block |
||
327 | 327 | $authorName = ($authorUser instanceof IUser) ? $authorUser->getDisplayName() : $author; |
328 | 328 | $authorEmail = ($authorUser instanceof IUser) ? $authorUser->getEMailAddress() : null; |
329 | 329 | |
330 | - $this->miscService->log("Sending password mail about existing files to '" . $email . "'", 0); |
|
330 | + $this->miscService->log("Sending password mail about existing files to '".$email."'", 0); |
|
331 | 331 | |
332 | 332 | $plainBodyPart = $this->l10n->t( |
333 | 333 | "%1\$s shared multiple files with you.\nYou should have already received a separate mail with a link to access them.\n", |
@@ -369,7 +369,7 @@ discard block |
||
369 | 369 | $message->setFrom([\OCP\Util::getDefaultEmailAddress($instanceName) => $senderName]); |
370 | 370 | if ($authorEmail !== null) { |
371 | 371 | $message->setReplyTo([$authorEmail => $authorName]); |
372 | - $emailTemplate->addFooter($instanceName . ' - ' . $this->defaults->getSlogan()); |
|
372 | + $emailTemplate->addFooter($instanceName.' - '.$this->defaults->getSlogan()); |
|
373 | 373 | } else { |
374 | 374 | $emailTemplate->addFooter(); |
375 | 375 | } |
@@ -116,13 +116,13 @@ discard block |
||
116 | 116 | } |
117 | 117 | |
118 | 118 | $this->miscService->log( |
119 | - 'updating member :' . json_encode($member) . ' from ' . json_encode($knownMember), 2 |
|
119 | + 'updating member :'.json_encode($member).' from '.json_encode($knownMember), 2 |
|
120 | 120 | ); |
121 | 121 | $this->membersRequest->updateMemberLevel($member); |
122 | 122 | } catch (MemberDoesNotExistException $e) { |
123 | 123 | try { |
124 | 124 | $this->miscService->log( |
125 | - 'creating member :' . json_encode($member), 2 |
|
125 | + 'creating member :'.json_encode($member), 2 |
|
126 | 126 | ); |
127 | 127 | $this->membersRequest->createMember($member); |
128 | 128 | } catch (MemberAlreadyExistsException $e) { |
@@ -140,7 +140,7 @@ discard block |
||
140 | 140 | try { |
141 | 141 | $this->getMember($knownItem, $circle->getMembers(), $source); |
142 | 142 | } catch (MemberDoesNotExistException $e) { |
143 | - $this->miscService->log('removing deprecated member :' . json_encode($knownItem), 2); |
|
143 | + $this->miscService->log('removing deprecated member :'.json_encode($knownItem), 2); |
|
144 | 144 | $this->membersRequest->removeMember($knownItem); |
145 | 145 | $this->gsSharesRequest->removeGSSharesFromMember($knownItem); |
146 | 146 | } |
@@ -150,7 +150,7 @@ discard block |
||
150 | 150 | } |
151 | 151 | } catch (Exception $e) { |
152 | 152 | $this->miscService->log( |
153 | - get_class($e) . ' on new event: ' . $e->getMessage() . ' - ' . json_encode($event), 1 |
|
153 | + get_class($e).' on new event: '.$e->getMessage().' - '.json_encode($event), 1 |
|
154 | 154 | ); |
155 | 155 | throw $e; |
156 | 156 | } |
@@ -246,13 +246,13 @@ discard block |
||
246 | 246 | $request->setDataSerialize($event); |
247 | 247 | |
248 | 248 | $result = $this->retrieveJson($request); |
249 | - $this->miscService->log('result ' . json_encode($result), 0); |
|
249 | + $this->miscService->log('result '.json_encode($result), 0); |
|
250 | 250 | if ($this->getInt('status', $result) === 0) { |
251 | 251 | throw new GlobalScaleEventException($this->get('error', $result)); |
252 | 252 | } |
253 | 253 | |
254 | 254 | $updatedData = $this->getArray('event', $result); |
255 | - $this->miscService->log('updatedEvent: ' . json_encode($updatedData), 0); |
|
255 | + $this->miscService->log('updatedEvent: '.json_encode($updatedData), 0); |
|
256 | 256 | if (!empty($updatedData)) { |
257 | 257 | $updated = new GSEvent(); |
258 | 258 | try { |
@@ -132,7 +132,7 @@ discard block |
||
132 | 132 | */ |
133 | 133 | public function create($circleUniqueId, $source, $type, $payload) { |
134 | 134 | |
135 | - $this->miscService->log('Creating circle share: ' . $circleUniqueId, 0); |
|
135 | + $this->miscService->log('Creating circle share: '.$circleUniqueId, 0); |
|
136 | 136 | |
137 | 137 | try { |
138 | 138 | $share = new SharingFrame($source, $type); |
@@ -140,7 +140,7 @@ discard block |
||
140 | 140 | |
141 | 141 | $this->sharingFrameService->createFrame($circleUniqueId, $share); |
142 | 142 | } catch (\Exception $e) { |
143 | - $this->miscService->log('Failed to create circle - ' . $e->getMessage(), 3); |
|
143 | + $this->miscService->log('Failed to create circle - '.$e->getMessage(), 3); |
|
144 | 144 | |
145 | 145 | return $this->fail( |
146 | 146 | [ |
@@ -153,7 +153,7 @@ discard block |
||
153 | 153 | ); |
154 | 154 | } |
155 | 155 | |
156 | - $this->miscService->log('Created circle: share ' . $circleUniqueId, 0); |
|
156 | + $this->miscService->log('Created circle: share '.$circleUniqueId, 0); |
|
157 | 157 | |
158 | 158 | return $this->success( |
159 | 159 | [ |
@@ -463,7 +463,7 @@ discard block |
||
463 | 463 | */ |
464 | 464 | public static function generateLink($circleUniqueId) { |
465 | 465 | return OC::$server->getURLGenerator() |
466 | - ->linkToRoute('circles.Navigation.navigate') . '#' . $circleUniqueId; |
|
466 | + ->linkToRoute('circles.Navigation.navigate').'#'.$circleUniqueId; |
|
467 | 467 | } |
468 | 468 | |
469 | 469 | |
@@ -478,7 +478,7 @@ discard block |
||
478 | 478 | */ |
479 | 479 | public static function generateAbsoluteLink($circleUniqueId) { |
480 | 480 | return OC::$server->getURLGenerator() |
481 | - ->linkToRouteAbsolute('circles.Navigation.navigate') . '#' . $circleUniqueId; |
|
481 | + ->linkToRouteAbsolute('circles.Navigation.navigate').'#'.$circleUniqueId; |
|
482 | 482 | } |
483 | 483 | |
484 | 484 | |
@@ -493,8 +493,8 @@ discard block |
||
493 | 493 | */ |
494 | 494 | public static function generateRemoteLink(FederatedLink $link) { |
495 | 495 | return OC::$server->getURLGenerator() |
496 | - ->linkToRoute('circles.Navigation.navigate') . '#' . $link->getUniqueId() |
|
497 | - . '-' . $link->getToken(); |
|
496 | + ->linkToRoute('circles.Navigation.navigate').'#'.$link->getUniqueId() |
|
497 | + . '-'.$link->getToken(); |
|
498 | 498 | } |
499 | 499 | |
500 | 500 | |
@@ -505,7 +505,7 @@ discard block |
||
505 | 505 | */ |
506 | 506 | public static function generateUserParameter(SharingFrame $frame) { |
507 | 507 | if ($frame->getCloudId() !== null) { |
508 | - $name = $frame->getAuthor() . '@' . $frame->getCloudId(); |
|
508 | + $name = $frame->getAuthor().'@'.$frame->getCloudId(); |
|
509 | 509 | } else { |
510 | 510 | try { |
511 | 511 | $membersService = \OC::$server->query(MembersService::class); |
@@ -132,7 +132,7 @@ discard block |
||
132 | 132 | $this->miscService = OC::$server->query(MiscService::class); |
133 | 133 | } catch (QueryException $e) { |
134 | 134 | OC::$server->getLogger() |
135 | - ->log(1, 'Circles: cannot init FileSharingBroadcaster - ' . $e->getMessage()); |
|
135 | + ->log(1, 'Circles: cannot init FileSharingBroadcaster - '.$e->getMessage()); |
|
136 | 136 | } |
137 | 137 | |
138 | 138 | try { |
@@ -325,7 +325,7 @@ discard block |
||
325 | 325 | * @throws IllegalIDChangeException |
326 | 326 | */ |
327 | 327 | private function generateShare($data): IShare { |
328 | - $this->logger->log(0, 'Regenerate shares from payload: ' . json_encode($data)); |
|
328 | + $this->logger->log(0, 'Regenerate shares from payload: '.json_encode($data)); |
|
329 | 329 | |
330 | 330 | $share = new Share($this->rootFolder, $this->userManager); |
331 | 331 | $share->setId($data['id']); |
@@ -418,7 +418,7 @@ discard block |
||
418 | 418 | $this->sendPasswordByMail($share, $displayName, $email, $password); |
419 | 419 | } catch (Exception $e) { |
420 | 420 | OC::$server->getLogger() |
421 | - ->log(1, 'Circles::sharedByMail - mail were not sent: ' . $e->getMessage()); |
|
421 | + ->log(1, 'Circles::sharedByMail - mail were not sent: '.$e->getMessage()); |
|
422 | 422 | } |
423 | 423 | } |
424 | 424 | |
@@ -436,8 +436,8 @@ discard block |
||
436 | 436 | $message = $this->mailer->createMessage(); |
437 | 437 | |
438 | 438 | $this->logger->log( |
439 | - 0, "Sending mail to circle '" . $circleName . "': " . $email . ' file: ' . $fileName |
|
440 | - . ' - link: ' . $link |
|
439 | + 0, "Sending mail to circle '".$circleName."': ".$email.' file: '.$fileName |
|
440 | + . ' - link: '.$link |
|
441 | 441 | ); |
442 | 442 | |
443 | 443 | $subject = $this->l10n->t('%s shared »%s« with you.', [$author, $fileName]); |
@@ -476,7 +476,7 @@ discard block |
||
476 | 476 | |
477 | 477 | $message = $this->mailer->createMessage(); |
478 | 478 | |
479 | - $this->logger->log(0, "Sending password mail to circle '" . $circleName . "': " . $email); |
|
479 | + $this->logger->log(0, "Sending password mail to circle '".$circleName."': ".$email); |
|
480 | 480 | |
481 | 481 | $filename = $share->getNode() |
482 | 482 | ->getName(); |
@@ -531,7 +531,7 @@ discard block |
||
531 | 531 | $message->setFrom([\OCP\Util::getDefaultEmailAddress($instanceName) => $senderName]); |
532 | 532 | if ($initiatorEmailAddress !== null) { |
533 | 533 | $message->setReplyTo([$initiatorEmailAddress => $initiatorDisplayName]); |
534 | - $emailTemplate->addFooter($instanceName . ' - ' . $this->defaults->getSlogan()); |
|
534 | + $emailTemplate->addFooter($instanceName.' - '.$this->defaults->getSlogan()); |
|
535 | 535 | } else { |
536 | 536 | $emailTemplate->addFooter(); |
537 | 537 | } |
@@ -566,7 +566,7 @@ discard block |
||
566 | 566 | $emailTemplate->addHeader(); |
567 | 567 | $emailTemplate->addHeading($subject, false); |
568 | 568 | $emailTemplate->addBodyText( |
569 | - htmlspecialchars($text) . '<br>' . htmlspecialchars( |
|
569 | + htmlspecialchars($text).'<br>'.htmlspecialchars( |
|
570 | 570 | $this->l10n->t('Click the button below to open it.') |
571 | 571 | ), $text |
572 | 572 | ); |
@@ -612,7 +612,7 @@ discard block |
||
612 | 612 | $this->sendMailExistingShares($template, $author->getCachedName(), $recipient); |
613 | 613 | $this->sendPasswordExistingShares($author, $recipient, $password); |
614 | 614 | } catch (Exception $e) { |
615 | - $this->logger->log(2, 'Failed to send mail about existing share ' . $e->getMessage()); |
|
615 | + $this->logger->log(2, 'Failed to send mail about existing share '.$e->getMessage()); |
|
616 | 616 | } |
617 | 617 | } |
618 | 618 | |
@@ -635,7 +635,7 @@ discard block |
||
635 | 635 | $authorName = ($authorUser instanceof IUser) ? $authorUser->getDisplayName() : $author; |
636 | 636 | $authorEmail = ($authorUser instanceof IUser) ? $authorUser->getEMailAddress() : null; |
637 | 637 | |
638 | - $this->logger->log(0, "Sending password mail about existing files to '" . $email . "'"); |
|
638 | + $this->logger->log(0, "Sending password mail about existing files to '".$email."'"); |
|
639 | 639 | |
640 | 640 | $plainBodyPart = $this->l10n->t( |
641 | 641 | "%1\$s shared multiple files with you.\nYou should have already received a separate mail with a link to access them.\n", |
@@ -677,7 +677,7 @@ discard block |
||
677 | 677 | $message->setFrom([\OCP\Util::getDefaultEmailAddress($instanceName) => $senderName]); |
678 | 678 | if ($authorEmail !== null) { |
679 | 679 | $message->setReplyTo([$authorEmail => $authorName]); |
680 | - $emailTemplate->addFooter($instanceName . ' - ' . $this->defaults->getSlogan()); |
|
680 | + $emailTemplate->addFooter($instanceName.' - '.$this->defaults->getSlogan()); |
|
681 | 681 | } else { |
682 | 682 | $emailTemplate->addFooter(); |
683 | 683 | } |
@@ -722,7 +722,7 @@ discard block |
||
722 | 722 | */ |
723 | 723 | protected function generateMailExitingShares($author, $circleName) { |
724 | 724 | $this->logger->log( |
725 | - 0, "Generating mail about existing share mail from '" . $author . "' in " |
|
725 | + 0, "Generating mail about existing share mail from '".$author."' in " |
|
726 | 726 | . $circleName |
727 | 727 | ); |
728 | 728 |
@@ -95,7 +95,7 @@ |
||
95 | 95 | RequestResultNotJsonException $e |
96 | 96 | ) { |
97 | 97 | $this->miscService->log( |
98 | - 'Issue while search users from lookup: ' . get_class($e) . ' ' . $e->getMessage() |
|
98 | + 'Issue while search users from lookup: '.get_class($e).' '.$e->getMessage() |
|
99 | 99 | ); |
100 | 100 | |
101 | 101 | return []; |
@@ -137,7 +137,7 @@ discard block |
||
137 | 137 | continue; |
138 | 138 | } |
139 | 139 | |
140 | - $replace['{' . $k . '}'] = $data[$k]['_parsed']; |
|
140 | + $replace['{'.$k.'}'] = $data[$k]['_parsed']; |
|
141 | 141 | } |
142 | 142 | |
143 | 143 | $line = strtr($line, $replace); |
@@ -301,7 +301,7 @@ discard block |
||
301 | 301 | return [ |
302 | 302 | 'type' => $member->getTypeName(), |
303 | 303 | 'id' => $member->getUserId(), |
304 | - 'name' => $member->getCachedName() . ' (' . $member->getTypeString() . ')', |
|
304 | + 'name' => $member->getCachedName().' ('.$member->getTypeString().')', |
|
305 | 305 | '_parsed' => $member->getCachedName() |
306 | 306 | ]; |
307 | 307 | } |
@@ -337,8 +337,8 @@ discard block |
||
337 | 337 | return [ |
338 | 338 | 'type' => 'circle', |
339 | 339 | 'id' => $link->getUniqueId(), |
340 | - 'name' => $link->getToken() . '@' . $link->getAddress(), |
|
341 | - '_parsed' => $link->getToken() . '@' . $link->getAddress() |
|
340 | + 'name' => $link->getToken().'@'.$link->getAddress(), |
|
341 | + '_parsed' => $link->getToken().'@'.$link->getAddress() |
|
342 | 342 | ]; |
343 | 343 | } |
344 | 344 |
@@ -59,7 +59,7 @@ |
||
59 | 59 | use Throwable; |
60 | 60 | |
61 | 61 | |
62 | -require_once __DIR__ . '/../../vendor/autoload.php'; |
|
62 | +require_once __DIR__.'/../../vendor/autoload.php'; |
|
63 | 63 | |
64 | 64 | |
65 | 65 | /** |