@@ -37,7 +37,6 @@ |
||
37 | 37 | use daita\MySmallPhpTools\Model\SimpleDataStore; |
38 | 38 | use daita\MySmallPhpTools\Traits\TArrayTools; |
39 | 39 | use JsonSerializable; |
40 | -use OCA\Circles\Exceptions\UnknownInterfaceException; |
|
41 | 40 | |
42 | 41 | |
43 | 42 | /** |
@@ -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; |
@@ -331,10 +331,10 @@ discard block |
||
331 | 331 | protected function generateMember(FederatedEvent $event, Circle $circle, Member $member): Member { |
332 | 332 | try { |
333 | 333 | if ($member->getSingleId() !== '') { |
334 | - $userId = $member->getSingleId() . '@' . $member->getInstance(); |
|
334 | + $userId = $member->getSingleId().'@'.$member->getInstance(); |
|
335 | 335 | $federatedUser = $this->federatedUserService->getFederatedUser($userId, Member::TYPE_SINGLE); |
336 | 336 | } else { |
337 | - $userId = $member->getUserId() . '@' . $member->getInstance(); |
|
337 | + $userId = $member->getUserId().'@'.$member->getInstance(); |
|
338 | 338 | $federatedUser = |
339 | 339 | $this->federatedUserService->getFederatedUser($userId, $member->getUserType()); |
340 | 340 | } |
@@ -638,7 +638,7 @@ discard block |
||
638 | 638 | $this->sendMailExistingShares($template, $author, $recipient); |
639 | 639 | $this->sendPasswordExistingShares($author, $recipient, $password); |
640 | 640 | } catch (Exception $e) { |
641 | - $this->miscService->log('Failed to send mail about existing share ' . $e->getMessage()); |
|
641 | + $this->miscService->log('Failed to send mail about existing share '.$e->getMessage()); |
|
642 | 642 | } |
643 | 643 | } |
644 | 644 | |
@@ -790,7 +790,7 @@ discard block |
||
790 | 790 | $authorName = ($authorUser instanceof IUser) ? $authorUser->getDisplayName() : $author; |
791 | 791 | $authorEmail = ($authorUser instanceof IUser) ? $authorUser->getEMailAddress() : null; |
792 | 792 | |
793 | - $this->miscService->log("Sending password mail about existing files to '" . $email . "'", 0); |
|
793 | + $this->miscService->log("Sending password mail about existing files to '".$email."'", 0); |
|
794 | 794 | |
795 | 795 | $plainBodyPart = $this->l10n->t( |
796 | 796 | "%1\$s shared multiple files with you.\nYou should have already received a separate email with a link to access them.\n", |
@@ -832,7 +832,7 @@ discard block |
||
832 | 832 | $message->setFrom([\OCP\Util::getDefaultEmailAddress($instanceName) => $senderName]); |
833 | 833 | if ($authorEmail !== null) { |
834 | 834 | $message->setReplyTo([$authorEmail => $authorName]); |
835 | - $emailTemplate->addFooter($instanceName . ' - ' . $this->defaults->getSlogan()); |
|
835 | + $emailTemplate->addFooter($instanceName.' - '.$this->defaults->getSlogan()); |
|
836 | 836 | } else { |
837 | 837 | $emailTemplate->addFooter(); |
838 | 838 | } |
@@ -176,7 +176,7 @@ discard block |
||
176 | 176 | return $value; |
177 | 177 | } |
178 | 178 | |
179 | - if (($value = $this->config->getSystemValue(Application::APP_ID . '.' . $key, '')) !== '') { |
|
179 | + if (($value = $this->config->getSystemValue(Application::APP_ID.'.'.$key, '')) !== '') { |
|
180 | 180 | return $value; |
181 | 181 | } |
182 | 182 | |
@@ -430,7 +430,7 @@ discard block |
||
430 | 430 | } |
431 | 431 | |
432 | 432 | if (array_key_exists('port', $loopback)) { |
433 | - $loopbackCloudId = $loopback['host'] . ':' . $loopback['port']; |
|
433 | + $loopbackCloudId = $loopback['host'].':'.$loopback['port']; |
|
434 | 434 | } else { |
435 | 435 | $loopbackCloudId = $loopback['host']; |
436 | 436 | } |
@@ -459,12 +459,12 @@ discard block |
||
459 | 459 | $scheme = $this->getAppValue(self::LOOPBACK_CLOUD_SCHEME); |
460 | 460 | } |
461 | 461 | |
462 | - $base = $scheme . '://' . $instance; |
|
462 | + $base = $scheme.'://'.$instance; |
|
463 | 463 | if ($route === '') { |
464 | 464 | return $base; |
465 | 465 | } |
466 | 466 | |
467 | - return $base . $this->urlGenerator->linkToRoute($route, $args); |
|
467 | + return $base.$this->urlGenerator->linkToRoute($route, $args); |
|
468 | 468 | } |
469 | 469 | |
470 | 470 | |
@@ -561,7 +561,7 @@ discard block |
||
561 | 561 | * @return string |
562 | 562 | */ |
563 | 563 | public function displayFederatedUser(IFederatedUser $federatedUser): string { |
564 | - return $federatedUser->getUserId() . $this->displayInstance($federatedUser->getInstance(), true); |
|
564 | + return $federatedUser->getUserId().$this->displayInstance($federatedUser->getInstance(), true); |
|
565 | 565 | } |
566 | 566 | |
567 | 567 | /** |
@@ -575,7 +575,7 @@ discard block |
||
575 | 575 | return ''; |
576 | 576 | } |
577 | 577 | |
578 | - return (($showAt) ? '@' : '') . $instance; |
|
578 | + return (($showAt) ? '@' : '').$instance; |
|
579 | 579 | } |
580 | 580 | |
581 | 581 |
@@ -83,7 +83,6 @@ |
||
83 | 83 | /** |
84 | 84 | * CirclesManager constructor. |
85 | 85 | * |
86 | - * @param IUserSession $userSession |
|
87 | 86 | * @param FederatedUserService $federatedUserService |
88 | 87 | * @param CircleService $circleService |
89 | 88 | * @param MemberService $memberService |
@@ -489,7 +489,7 @@ discard block |
||
489 | 489 | |
490 | 490 | $i = 1; |
491 | 491 | while (true) { |
492 | - $testDisplayName = $baseDisplayName . (($i > 1) ? ' (' . $i . ')' : ''); |
|
492 | + $testDisplayName = $baseDisplayName.(($i > 1) ? ' ('.$i.')' : ''); |
|
493 | 493 | $test = new Circle(); |
494 | 494 | $test->setDisplayName($testDisplayName); |
495 | 495 | |
@@ -522,7 +522,7 @@ discard block |
||
522 | 522 | |
523 | 523 | $i = 1; |
524 | 524 | while (true) { |
525 | - $testSanitizedName = $baseSanitizedName . (($i > 1) ? '-' . $i : ''); |
|
525 | + $testSanitizedName = $baseSanitizedName.(($i > 1) ? '-'.$i : ''); |
|
526 | 526 | |
527 | 527 | $test = new Circle(); |
528 | 528 | $test->setSanitizedName($testSanitizedName); |