@@ -111,7 +111,7 @@ discard block |
||
111 | 111 | ]; |
112 | 112 | |
113 | 113 | if (!key_exists(strtolower($level), $levels)) { |
114 | - throw new Exception('unknown level: ' . json_encode(array_keys($levels))); |
|
114 | + throw new Exception('unknown level: '.json_encode(array_keys($levels))); |
|
115 | 115 | } |
116 | 116 | |
117 | 117 | $level = $levels[strtolower($level)]; |
@@ -124,7 +124,7 @@ discard block |
||
124 | 124 | $member = $this->membersRequest->forceGetMember( |
125 | 125 | $member->getCircleId(), $member->getUserId(), Member::TYPE_USER |
126 | 126 | ); |
127 | - echo json_encode($member, JSON_PRETTY_PRINT) . "\n"; |
|
127 | + echo json_encode($member, JSON_PRETTY_PRINT)."\n"; |
|
128 | 128 | |
129 | 129 | return 0; |
130 | 130 | } |
@@ -97,7 +97,7 @@ |
||
97 | 97 | $circles = $this->getCircles($owner, $viewer); |
98 | 98 | |
99 | 99 | if ($json) { |
100 | - echo json_encode($circles, JSON_PRETTY_PRINT) . "\n"; |
|
100 | + echo json_encode($circles, JSON_PRETTY_PRINT)."\n"; |
|
101 | 101 | |
102 | 102 | return 0; |
103 | 103 | } |
@@ -100,7 +100,7 @@ |
||
100 | 100 | $members = $this->membersRequest->forceGetMembers($circleId); |
101 | 101 | |
102 | 102 | if ($json) { |
103 | - echo json_encode($members, JSON_PRETTY_PRINT) . "\n"; |
|
103 | + echo json_encode($members, JSON_PRETTY_PRINT)."\n"; |
|
104 | 104 | |
105 | 105 | return 0; |
106 | 106 | } |
@@ -125,7 +125,7 @@ discard block |
||
125 | 125 | ]; |
126 | 126 | |
127 | 127 | if (!key_exists(strtolower($type), $types)) { |
128 | - throw new CircleTypeNotValidException('unknown type: ' . json_encode(array_keys($types))); |
|
128 | + throw new CircleTypeNotValidException('unknown type: '.json_encode(array_keys($types))); |
|
129 | 129 | } |
130 | 130 | |
131 | 131 | $type = $types[strtolower($type)]; |
@@ -133,7 +133,7 @@ discard block |
||
133 | 133 | $circle = $this->circlesService->createCircle($type, $name, $ownerId); |
134 | 134 | $circle = $this->circlesRequest->forceGetCircle($circle->getUniqueId()); |
135 | 135 | |
136 | - echo json_encode($circle, JSON_PRETTY_PRINT) . "\n"; |
|
136 | + echo json_encode($circle, JSON_PRETTY_PRINT)."\n"; |
|
137 | 137 | |
138 | 138 | return 0; |
139 | 139 | } |
@@ -85,7 +85,7 @@ |
||
85 | 85 | $memberId = $input->getArgument('member_id'); |
86 | 86 | |
87 | 87 | $member = $this->membersRequest->forceGetMemberById($memberId); |
88 | - echo json_encode($member, JSON_PRETTY_PRINT) . "\n"; |
|
88 | + echo json_encode($member, JSON_PRETTY_PRINT)."\n"; |
|
89 | 89 | |
90 | 90 | return 0; |
91 | 91 | } |
@@ -300,7 +300,7 @@ discard block |
||
300 | 300 | * returns the index of a specific UserID in a Members List |
301 | 301 | * |
302 | 302 | * @param array $members |
303 | - * @param $userId |
|
303 | + * @param string $userId |
|
304 | 304 | * |
305 | 305 | * @return int |
306 | 306 | */ |
@@ -631,12 +631,19 @@ discard block |
||
631 | 631 | } |
632 | 632 | |
633 | 633 | |
634 | + /** |
|
635 | + * @param string $groupId |
|
636 | + */ |
|
634 | 637 | public function unlinkAllFromGroup($groupId) { |
635 | 638 | $qb = $this->getGroupsDeleteSql($groupId); |
636 | 639 | $qb->execute(); |
637 | 640 | } |
638 | 641 | |
639 | 642 | |
643 | + /** |
|
644 | + * @param string $circleId |
|
645 | + * @param string $groupId |
|
646 | + */ |
|
640 | 647 | public function unlinkFromGroup($circleId, $groupId) { |
641 | 648 | $qb = $this->getGroupsDeleteSql($groupId); |
642 | 649 | $this->limitToCircleId($qb, $circleId); |
@@ -674,8 +681,6 @@ discard block |
||
674 | 681 | /** |
675 | 682 | * @param string $circleId |
676 | 683 | * @param string $contactId |
677 | - * @param string $userId |
|
678 | - * @param int $type |
|
679 | 684 | * |
680 | 685 | * @return Member |
681 | 686 | * @throws MemberDoesNotExistException |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | use OCP\EventDispatcher\IEventDispatcher; |
43 | 43 | use OCP\Util; |
44 | 44 | |
45 | -require_once __DIR__ . '/../../appinfo/autoload.php'; |
|
45 | +require_once __DIR__.'/../../appinfo/autoload.php'; |
|
46 | 46 | |
47 | 47 | |
48 | 48 | class Application extends App { |
@@ -245,9 +245,9 @@ discard block |
||
245 | 245 | $this->dispatcher->addListener('\OCA\Circles::onLinkRemove', [$groupsBackendService, 'onLinkRemove']); |
246 | 246 | $this->dispatcher->addListener('\OCA\Circles::onSettingsChange', [$groupsBackendService, 'onSettingsChange']); |
247 | 247 | |
248 | - $this->dispatcher->addListener(IGroup::class . '::postAddUser', [$groupsBackendService, 'onGroupPostAddUser']); |
|
249 | - $this->dispatcher->addListener(IGroup::class . '::postRemoveUser', [$groupsBackendService, 'onGroupPostRemoveUser']); |
|
250 | - $this->dispatcher->addListener(IGroup::class . '::postDelete', [$groupsBackendService, 'onGroupPostDelete']); |
|
248 | + $this->dispatcher->addListener(IGroup::class.'::postAddUser', [$groupsBackendService, 'onGroupPostAddUser']); |
|
249 | + $this->dispatcher->addListener(IGroup::class.'::postRemoveUser', [$groupsBackendService, 'onGroupPostRemoveUser']); |
|
250 | + $this->dispatcher->addListener(IGroup::class.'::postDelete', [$groupsBackendService, 'onGroupPostDelete']); |
|
251 | 251 | } |
252 | 252 | |
253 | 253 | } |
@@ -152,7 +152,7 @@ discard block |
||
152 | 152 | continue; |
153 | 153 | } |
154 | 154 | |
155 | - $replace['{' . $k . '}'] = $data[$k]['_parsed']; |
|
155 | + $replace['{'.$k.'}'] = $data[$k]['_parsed']; |
|
156 | 156 | } |
157 | 157 | |
158 | 158 | $line = strtr($line, $replace); |
@@ -316,7 +316,7 @@ discard block |
||
316 | 316 | return [ |
317 | 317 | 'type' => $member->getTypeName(), |
318 | 318 | 'id' => $member->getUserId(), |
319 | - 'name' => $member->getDisplayName() . ' (' . $member->getTypeString() . ')', |
|
319 | + 'name' => $member->getDisplayName().' ('.$member->getTypeString().')', |
|
320 | 320 | '_parsed' => $member->getDisplayName() |
321 | 321 | ]; |
322 | 322 | } |
@@ -352,8 +352,8 @@ discard block |
||
352 | 352 | return [ |
353 | 353 | 'type' => 'circle', |
354 | 354 | 'id' => $link->getUniqueId(), |
355 | - 'name' => $link->getToken() . '@' . $link->getAddress(), |
|
356 | - '_parsed' => $link->getToken() . '@' . $link->getAddress() |
|
355 | + 'name' => $link->getToken().'@'.$link->getAddress(), |
|
356 | + '_parsed' => $link->getToken().'@'.$link->getAddress() |
|
357 | 357 | ]; |
358 | 358 | } |
359 | 359 |
@@ -277,7 +277,7 @@ discard block |
||
277 | 277 | if ((!$this->isNonSSLLinksAllowed() || strpos($remote, 'http://') !== 0) |
278 | 278 | && strpos($remote, 'https://') !== 0 |
279 | 279 | ) { |
280 | - $remote = 'https://' . $remote; |
|
280 | + $remote = 'https://'.$remote; |
|
281 | 281 | } |
282 | 282 | |
283 | 283 | return rtrim($remote, '/'); |
@@ -469,7 +469,7 @@ discard block |
||
469 | 469 | if ($this->groupBackendNamePrefix === null && $this->isGroupsBackend()) { |
470 | 470 | $l = OC::$server->getL10N('circles'); |
471 | 471 | $defaultPrefix = $l->t('Circle').' '; |
472 | - $customPrefix = (string) $this->getAppValue(self::CIRCLES_GROUP_BACKEND_NAME_PREFIX); |
|
472 | + $customPrefix = (string)$this->getAppValue(self::CIRCLES_GROUP_BACKEND_NAME_PREFIX); |
|
473 | 473 | $this->groupBackendNamePrefix = ltrim($customPrefix ?: $defaultPrefix); |
474 | 474 | } |
475 | 475 | |
@@ -483,7 +483,7 @@ discard block |
||
483 | 483 | */ |
484 | 484 | public function getGroupBackendNameSuffix() { |
485 | 485 | if ($this->groupBackendNameSuffix === null && $this->isGroupsBackend()) { |
486 | - $this->groupBackendNameSuffix = rtrim((string) $this->getAppValue(self::CIRCLES_GROUP_BACKEND_NAME_SUFFIX)); |
|
486 | + $this->groupBackendNameSuffix = rtrim((string)$this->getAppValue(self::CIRCLES_GROUP_BACKEND_NAME_SUFFIX)); |
|
487 | 487 | } |
488 | 488 | |
489 | 489 | return $this->groupBackendNameSuffix; |