@@ -104,16 +104,16 @@ |
||
104 | 104 | } catch (Exception $e) { |
105 | 105 | $this->e($e); |
106 | 106 | |
107 | - return $membership->getSingleId() . ' is now ' . $inheritance . ' of ' |
|
107 | + return $membership->getSingleId().' is now '.$inheritance.' of ' |
|
108 | 108 | . $membership->getCircleId(); |
109 | 109 | } |
110 | 110 | |
111 | - return $federatedUser->getUserId() . ' (' . Member::$TYPE[$federatedUser->getUserType()] |
|
112 | - . ') is now ' . $inheritance . ' of ' . $membership->getCircleId(); |
|
111 | + return $federatedUser->getUserId().' ('.Member::$TYPE[$federatedUser->getUserType()] |
|
112 | + . ') is now '.$inheritance.' of '.$membership->getCircleId(); |
|
113 | 113 | }, $event->getMemberships() |
114 | 114 | ); |
115 | 115 | |
116 | - $this->log(3, $prefix . implode('. ', $memberships)); |
|
116 | + $this->log(3, $prefix.implode('. ', $memberships)); |
|
117 | 117 | } |
118 | 118 | |
119 | 119 | } |
@@ -144,7 +144,7 @@ |
||
144 | 144 | $circle = new Circle(); |
145 | 145 | $circle->importFromDatabase( |
146 | 146 | $data, |
147 | - CoreQueryBuilder::HELPER . '_' . CoreQueryBuilder::CIRCLE . '_' |
|
147 | + CoreQueryBuilder::HELPER.'_'.CoreQueryBuilder::CIRCLE.'_' |
|
148 | 148 | ); |
149 | 149 | |
150 | 150 | return $circle; |
@@ -251,16 +251,16 @@ |
||
251 | 251 | try { |
252 | 252 | $test = new ReflectionClass($class); |
253 | 253 | } catch (ReflectionException $e) { |
254 | - throw new FederatedEventException('ReflectionException with ' . $class . ': ' . $e->getMessage()); |
|
254 | + throw new FederatedEventException('ReflectionException with '.$class.': '.$e->getMessage()); |
|
255 | 255 | } |
256 | 256 | |
257 | 257 | if (!in_array(IFederatedItem::class, $test->getInterfaceNames())) { |
258 | - throw new FederatedEventException($class . ' does not implements IFederatedItem'); |
|
258 | + throw new FederatedEventException($class.' does not implements IFederatedItem'); |
|
259 | 259 | } |
260 | 260 | |
261 | 261 | $item = OC::$server->get($class); |
262 | 262 | if (!($item instanceof IFederatedItem)) { |
263 | - throw new FederatedEventException($class . ' not an IFederatedItem'); |
|
263 | + throw new FederatedEventException($class.' not an IFederatedItem'); |
|
264 | 264 | } |
265 | 265 | |
266 | 266 | if ($item instanceof IFederatedItemHighSeverity) { |
@@ -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 email 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 |
@@ -242,7 +242,7 @@ discard block |
||
242 | 242 | $this->sendMailExistingShares($template, $author, $recipient); |
243 | 243 | $this->sendPasswordExistingShares($author, $recipient, $password); |
244 | 244 | } catch (Exception $e) { |
245 | - $this->miscService->log('Failed to send mail about existing share ' . $e->getMessage()); |
|
245 | + $this->miscService->log('Failed to send mail about existing share '.$e->getMessage()); |
|
246 | 246 | } |
247 | 247 | } |
248 | 248 | |
@@ -392,7 +392,7 @@ discard block |
||
392 | 392 | $authorName = ($authorUser instanceof IUser) ? $authorUser->getDisplayName() : $author; |
393 | 393 | $authorEmail = ($authorUser instanceof IUser) ? $authorUser->getEMailAddress() : null; |
394 | 394 | |
395 | - $this->miscService->log("Sending password mail about existing files to '" . $email . "'", 0); |
|
395 | + $this->miscService->log("Sending password mail about existing files to '".$email."'", 0); |
|
396 | 396 | |
397 | 397 | $plainBodyPart = $this->l10n->t( |
398 | 398 | "%1\$s shared multiple files with you.\nYou should have already received a separate email with a link to access them.\n", |
@@ -434,7 +434,7 @@ discard block |
||
434 | 434 | $message->setFrom([\OCP\Util::getDefaultEmailAddress($instanceName) => $senderName]); |
435 | 435 | if ($authorEmail !== null) { |
436 | 436 | $message->setReplyTo([$authorEmail => $authorName]); |
437 | - $emailTemplate->addFooter($instanceName . ' - ' . $this->defaults->getSlogan()); |
|
437 | + $emailTemplate->addFooter($instanceName.' - '.$this->defaults->getSlogan()); |
|
438 | 438 | } else { |
439 | 439 | $emailTemplate->addFooter(); |
440 | 440 | } |
@@ -811,29 +811,29 @@ discard block |
||
811 | 811 | * @throws MemberNotFoundException |
812 | 812 | */ |
813 | 813 | public function importFromDatabase(array $data, string $prefix = ''): INC22QueryRow { |
814 | - if ($this->get($prefix . 'single_id', $data) === '') { |
|
814 | + if ($this->get($prefix.'single_id', $data) === '') { |
|
815 | 815 | throw new MemberNotFoundException(); |
816 | 816 | } |
817 | 817 | |
818 | - $this->setId($this->get($prefix . 'member_id', $data)); |
|
819 | - $this->setCircleId($this->get($prefix . 'circle_id', $data)); |
|
820 | - $this->setSingleId($this->get($prefix . 'single_id', $data)); |
|
821 | - $this->setUserId($this->get($prefix . 'user_id', $data)); |
|
822 | - $this->setUserType($this->getInt($prefix . 'user_type', $data)); |
|
823 | - $this->setInstance($this->get($prefix . 'instance', $data)); |
|
824 | - $this->setLevel($this->getInt($prefix . 'level', $data)); |
|
825 | - $this->setStatus($this->get($prefix . 'status', $data)); |
|
826 | - $this->setDisplayName($this->get($prefix . 'cached_name', $data)); |
|
827 | - $this->setNotes($this->getArray($prefix . 'note', $data)); |
|
828 | - $this->setContactId($this->get($prefix . 'contact_id', $data)); |
|
829 | - $this->setContactMeta($this->get($prefix . 'contact_meta', $data)); |
|
830 | - |
|
831 | - $cachedUpdate = $this->get($prefix . 'cached_update', $data); |
|
818 | + $this->setId($this->get($prefix.'member_id', $data)); |
|
819 | + $this->setCircleId($this->get($prefix.'circle_id', $data)); |
|
820 | + $this->setSingleId($this->get($prefix.'single_id', $data)); |
|
821 | + $this->setUserId($this->get($prefix.'user_id', $data)); |
|
822 | + $this->setUserType($this->getInt($prefix.'user_type', $data)); |
|
823 | + $this->setInstance($this->get($prefix.'instance', $data)); |
|
824 | + $this->setLevel($this->getInt($prefix.'level', $data)); |
|
825 | + $this->setStatus($this->get($prefix.'status', $data)); |
|
826 | + $this->setDisplayName($this->get($prefix.'cached_name', $data)); |
|
827 | + $this->setNotes($this->getArray($prefix.'note', $data)); |
|
828 | + $this->setContactId($this->get($prefix.'contact_id', $data)); |
|
829 | + $this->setContactMeta($this->get($prefix.'contact_meta', $data)); |
|
830 | + |
|
831 | + $cachedUpdate = $this->get($prefix.'cached_update', $data); |
|
832 | 832 | if ($cachedUpdate !== '') { |
833 | 833 | $this->setDisplayUpdate(DateTime::createFromFormat('Y-m-d H:i:s', $cachedUpdate)->getTimestamp()); |
834 | 834 | } |
835 | 835 | |
836 | - $joined = $this->get($prefix . 'joined', $data); |
|
836 | + $joined = $this->get($prefix.'joined', $data); |
|
837 | 837 | if ($joined !== '') { |
838 | 838 | $this->setJoined(DateTime::createFromFormat('Y-m-d H:i:s', $joined)->getTimestamp()); |
839 | 839 | } |
@@ -924,7 +924,7 @@ discard block |
||
924 | 924 | public static function parseLevelInt(int $level): int { |
925 | 925 | if (!array_key_exists($level, self::$DEF_LEVEL)) { |
926 | 926 | $all = implode(', ', array_keys(self::$DEF_LEVEL)); |
927 | - throw new ParseMemberLevelException('Available levels: ' . $all, 121); |
|
927 | + throw new ParseMemberLevelException('Available levels: '.$all, 121); |
|
928 | 928 | } |
929 | 929 | |
930 | 930 | return $level; |
@@ -943,7 +943,7 @@ discard block |
||
943 | 943 | |
944 | 944 | if (!$level) { |
945 | 945 | $all = implode(', ', array_values(self::$DEF_LEVEL)); |
946 | - throw new ParseMemberLevelException('Available levels: ' . $all, 121); |
|
946 | + throw new ParseMemberLevelException('Available levels: '.$all, 121); |
|
947 | 947 | } |
948 | 948 | |
949 | 949 | return (int)$level; |
@@ -964,7 +964,7 @@ discard block |
||
964 | 964 | $type = array_search($typeString, Member::$TYPE); |
965 | 965 | if ($type === false) { |
966 | 966 | $all = implode(', ', array_values(self::$TYPE)); |
967 | - throw new UserTypeNotFoundException('Available types: ' . $all); |
|
967 | + throw new UserTypeNotFoundException('Available types: '.$all); |
|
968 | 968 | } |
969 | 969 | |
970 | 970 | return (int)$type; |
@@ -169,7 +169,7 @@ |
||
169 | 169 | */ |
170 | 170 | private function output(string $message): void { |
171 | 171 | if (!is_null($this->output)) { |
172 | - $this->output->writeln('- ' . $message); |
|
172 | + $this->output->writeln('- '.$message); |
|
173 | 173 | } |
174 | 174 | } |
175 | 175 |
@@ -400,15 +400,15 @@ |
||
400 | 400 | * @throws FederatedUserNotFoundException |
401 | 401 | */ |
402 | 402 | public function importFromDatabase(array $data, string $prefix = ''): INC22QueryRow { |
403 | - if ($this->get($prefix . 'single_id', $data) === '') { |
|
403 | + if ($this->get($prefix.'single_id', $data) === '') { |
|
404 | 404 | throw new FederatedUserNotFoundException(); |
405 | 405 | } |
406 | 406 | |
407 | - $this->setSingleId($this->get($prefix . 'single_id', $data)); |
|
408 | - $this->setUserId($this->get($prefix . 'user_id', $data)); |
|
409 | - $this->setUserType($this->getInt($prefix . 'user_type', $data)); |
|
410 | - $this->setDisplayName($this->get($prefix . 'cached_name', $data)); |
|
411 | - $this->setInstance($this->get($prefix . 'instance', $data)); |
|
407 | + $this->setSingleId($this->get($prefix.'single_id', $data)); |
|
408 | + $this->setUserId($this->get($prefix.'user_id', $data)); |
|
409 | + $this->setUserType($this->getInt($prefix.'user_type', $data)); |
|
410 | + $this->setDisplayName($this->get($prefix.'cached_name', $data)); |
|
411 | + $this->setInstance($this->get($prefix.'instance', $data)); |
|
412 | 412 | |
413 | 413 | $this->getManager()->manageImportFromDatabase($this, $data, $prefix); |
414 | 414 |
@@ -50,11 +50,11 @@ discard block |
||
50 | 50 | |
51 | 51 | use TArrayTools; |
52 | 52 | |
53 | - const TYPE_UNKNOWN = 'Unknown'; // not trusted |
|
54 | - const TYPE_PASSIVE = 'Passive'; // Minimum information about Federated Circles are broadcasted if a member belongs to the circle. |
|
55 | - const TYPE_EXTERNAL = 'External'; // info about Federated Circles and their members are broadcasted if a member belongs to the circle. |
|
56 | - const TYPE_TRUSTED = 'Trusted'; // everything about Federated Circles are broadcasted. |
|
57 | - const TYPE_GLOBALSCALE = 'GlobalScale'; // every Circle is broadcasted, |
|
53 | + const TYPE_UNKNOWN = 'Unknown'; // not trusted |
|
54 | + const TYPE_PASSIVE = 'Passive'; // Minimum information about Federated Circles are broadcasted if a member belongs to the circle. |
|
55 | + const TYPE_EXTERNAL = 'External'; // info about Federated Circles and their members are broadcasted if a member belongs to the circle. |
|
56 | + const TYPE_TRUSTED = 'Trusted'; // everything about Federated Circles are broadcasted. |
|
57 | + const TYPE_GLOBALSCALE = 'GlobalScale'; // every Circle is broadcasted, |
|
58 | 58 | |
59 | 59 | public static $LIST_TYPE = [ |
60 | 60 | self::TYPE_UNKNOWN, |
@@ -477,7 +477,7 @@ discard block |
||
477 | 477 | ]; |
478 | 478 | |
479 | 479 | if ($this->getAuthSigned() !== '') { |
480 | - $data['auth-signed'] = $this->getAlgorithm() . ':' . $this->getAuthSigned(); |
|
480 | + $data['auth-signed'] = $this->getAlgorithm().':'.$this->getAuthSigned(); |
|
481 | 481 | } |
482 | 482 | |
483 | 483 | if (!empty($this->getAliases())) { |
@@ -496,17 +496,17 @@ discard block |
||
496 | 496 | * @throws RemoteNotFoundException |
497 | 497 | */ |
498 | 498 | public function importFromDatabase(array $data, string $prefix = ''): INC22QueryRow { |
499 | - if ($this->getInt($prefix . 'id', $data) === 0) { |
|
499 | + if ($this->getInt($prefix.'id', $data) === 0) { |
|
500 | 500 | throw new RemoteNotFoundException(); |
501 | 501 | } |
502 | 502 | |
503 | - $this->setDbId($this->getInt($prefix . 'id', $data)); |
|
504 | - $this->import($this->getArray($prefix . 'item', $data)); |
|
505 | - $this->setOrigData($this->getArray($prefix . 'item', $data)); |
|
506 | - $this->setType($this->get($prefix . 'type', $data)); |
|
507 | - $this->setInterface($this->getInt($prefix . 'interface', $data)); |
|
508 | - $this->setInstance($this->get($prefix . 'instance', $data)); |
|
509 | - $this->setId($this->get($prefix . 'href', $data)); |
|
503 | + $this->setDbId($this->getInt($prefix.'id', $data)); |
|
504 | + $this->import($this->getArray($prefix.'item', $data)); |
|
505 | + $this->setOrigData($this->getArray($prefix.'item', $data)); |
|
506 | + $this->setType($this->get($prefix.'type', $data)); |
|
507 | + $this->setInterface($this->getInt($prefix.'interface', $data)); |
|
508 | + $this->setInstance($this->get($prefix.'instance', $data)); |
|
509 | + $this->setId($this->get($prefix.'href', $data)); |
|
510 | 510 | |
511 | 511 | return $this; |
512 | 512 | } |