@@ -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 | } |
@@ -315,7 +315,7 @@ discard block |
||
| 315 | 315 | * @return BaseCircle |
| 316 | 316 | */ |
| 317 | 317 | public function setGroupId($groupId) { |
| 318 | - $this->groupId = (string) $groupId; |
|
| 318 | + $this->groupId = (string)$groupId; |
|
| 319 | 319 | |
| 320 | 320 | return $this; |
| 321 | 321 | } |
@@ -324,7 +324,7 @@ discard block |
||
| 324 | 324 | * @return string |
| 325 | 325 | */ |
| 326 | 326 | public function getGroupId() { |
| 327 | - return (string) $this->groupId; |
|
| 327 | + return (string)$this->groupId; |
|
| 328 | 328 | } |
| 329 | 329 | |
| 330 | 330 | /** |
@@ -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 | |
@@ -124,7 +124,7 @@ discard block |
||
| 124 | 124 | ); |
| 125 | 125 | } |
| 126 | 126 | |
| 127 | - $this->dispatch('\OCA\Circles::onCircleCreation', ['circle' => $circle]); |
|
| 127 | + $this->dispatch('\OCA\Circles::onCircleCreation', ['circle' => $circle]); |
|
| 128 | 128 | } |
| 129 | 129 | |
| 130 | 130 | |
@@ -151,7 +151,7 @@ discard block |
||
| 151 | 151 | ) |
| 152 | 152 | ); |
| 153 | 153 | |
| 154 | - $this->dispatch('\OCA\Circles::onCircleDestruction', ['circle' => $circle]); |
|
| 154 | + $this->dispatch('\OCA\Circles::onCircleDestruction', ['circle' => $circle]); |
|
| 155 | 155 | } |
| 156 | 156 | |
| 157 | 157 | |
@@ -196,7 +196,7 @@ discard block |
||
| 196 | 196 | ) |
| 197 | 197 | ); |
| 198 | 198 | |
| 199 | - $this->dispatch('\OCA\Circles::onMemberNew', ['circle' => $circle, 'member' => $member]); |
|
| 199 | + $this->dispatch('\OCA\Circles::onMemberNew', ['circle' => $circle, 'member' => $member]); |
|
| 200 | 200 | } |
| 201 | 201 | |
| 202 | 202 | |
@@ -252,7 +252,7 @@ discard block |
||
| 252 | 252 | ) |
| 253 | 253 | ) |
| 254 | 254 | ); |
| 255 | - $this->dispatch('\OCA\Circles::onMemberInvited', ['circle' => $circle, 'member' => $member]); |
|
| 255 | + $this->dispatch('\OCA\Circles::onMemberInvited', ['circle' => $circle, 'member' => $member]); |
|
| 256 | 256 | } |
| 257 | 257 | |
| 258 | 258 | |
@@ -284,7 +284,7 @@ discard block |
||
| 284 | 284 | ) |
| 285 | 285 | ) |
| 286 | 286 | ); |
| 287 | - $this->dispatch('\OCA\Circles::onMemberRequesting', ['circle' => $circle, 'member' => $member]); |
|
| 287 | + $this->dispatch('\OCA\Circles::onMemberRequesting', ['circle' => $circle, 'member' => $member]); |
|
| 288 | 288 | } |
| 289 | 289 | |
| 290 | 290 | |
@@ -318,7 +318,7 @@ discard block |
||
| 318 | 318 | ) |
| 319 | 319 | ); |
| 320 | 320 | |
| 321 | - $this->dispatch('\OCA\Circles::onMemberLeaving', ['circle' => $circle, 'member' => $member]); |
|
| 321 | + $this->dispatch('\OCA\Circles::onMemberLeaving', ['circle' => $circle, 'member' => $member]); |
|
| 322 | 322 | } |
| 323 | 323 | |
| 324 | 324 | |
@@ -351,7 +351,7 @@ discard block |
||
| 351 | 351 | $this->membersRequest->avoidDuplicateMembers($mods, [$member]); |
| 352 | 352 | |
| 353 | 353 | $this->publishEvent($event, $mods); |
| 354 | - $this->dispatch('\OCA\Circles::onMemberLevel', ['circle' => $circle, 'member' => $member]); |
|
| 354 | + $this->dispatch('\OCA\Circles::onMemberLevel', ['circle' => $circle, 'member' => $member]); |
|
| 355 | 355 | } |
| 356 | 356 | |
| 357 | 357 | |
@@ -376,7 +376,7 @@ discard block |
||
| 376 | 376 | $circle->getUniqueId(), Member::LEVEL_MEMBER, true |
| 377 | 377 | ) |
| 378 | 378 | ); |
| 379 | - $this->dispatch('\OCA\Circles::onMemberOwner', ['circle' => $circle, 'member' => $member]); |
|
| 379 | + $this->dispatch('\OCA\Circles::onMemberOwner', ['circle' => $circle, 'member' => $member]); |
|
| 380 | 380 | } |
| 381 | 381 | |
| 382 | 382 | |
@@ -409,7 +409,7 @@ discard block |
||
| 409 | 409 | ); |
| 410 | 410 | |
| 411 | 411 | $this->publishEvent($event, $mods); |
| 412 | - $this->dispatch('\OCA\Circles::onGroupLink', ['circle' => $circle, 'group' => $group]); |
|
| 412 | + $this->dispatch('\OCA\Circles::onGroupLink', ['circle' => $circle, 'group' => $group]); |
|
| 413 | 413 | } |
| 414 | 414 | |
| 415 | 415 | |
@@ -442,7 +442,7 @@ discard block |
||
| 442 | 442 | ); |
| 443 | 443 | |
| 444 | 444 | $this->publishEvent($event, $mods); |
| 445 | - $this->dispatch('\OCA\Circles::onGroupUnlink', ['circle' => $circle, 'group' => $group]); |
|
| 445 | + $this->dispatch('\OCA\Circles::onGroupUnlink', ['circle' => $circle, 'group' => $group]); |
|
| 446 | 446 | } |
| 447 | 447 | |
| 448 | 448 | |
@@ -475,7 +475,7 @@ discard block |
||
| 475 | 475 | ); |
| 476 | 476 | |
| 477 | 477 | $this->publishEvent($event, $mods); |
| 478 | - $this->dispatch('\OCA\Circles::onGroupLevel', ['circle' => $circle, 'group' => $group]); |
|
| 478 | + $this->dispatch('\OCA\Circles::onGroupLevel', ['circle' => $circle, 'group' => $group]); |
|
| 479 | 479 | } |
| 480 | 480 | |
| 481 | 481 | |
@@ -500,7 +500,7 @@ discard block |
||
| 500 | 500 | $link->getCircleId(), Member::LEVEL_MODERATOR, true |
| 501 | 501 | ) |
| 502 | 502 | ); |
| 503 | - $this->dispatch('\OCA\Circles::onLinkRequestSent', ['circle' => $circle, 'link' => $link]); |
|
| 503 | + $this->dispatch('\OCA\Circles::onLinkRequestSent', ['circle' => $circle, 'link' => $link]); |
|
| 504 | 504 | } |
| 505 | 505 | |
| 506 | 506 | |
@@ -525,7 +525,7 @@ discard block |
||
| 525 | 525 | $link->getCircleId(), Member::LEVEL_MODERATOR, true |
| 526 | 526 | ) |
| 527 | 527 | ); |
| 528 | - $this->dispatch('\OCA\Circles::onLinkRequestReceived', ['circle' => $circle, 'link' => $link]); |
|
| 528 | + $this->dispatch('\OCA\Circles::onLinkRequestReceived', ['circle' => $circle, 'link' => $link]); |
|
| 529 | 529 | } |
| 530 | 530 | |
| 531 | 531 | |
@@ -550,7 +550,7 @@ discard block |
||
| 550 | 550 | $link->getCircleId(), Member::LEVEL_MODERATOR, true |
| 551 | 551 | ) |
| 552 | 552 | ); |
| 553 | - $this->dispatch('\OCA\Circles::onLinkRequestRejected', ['circle' => $circle, 'link' => $link]); |
|
| 553 | + $this->dispatch('\OCA\Circles::onLinkRequestRejected', ['circle' => $circle, 'link' => $link]); |
|
| 554 | 554 | } |
| 555 | 555 | |
| 556 | 556 | |
@@ -575,7 +575,7 @@ discard block |
||
| 575 | 575 | $link->getCircleId(), Member::LEVEL_MODERATOR, true |
| 576 | 576 | ) |
| 577 | 577 | ); |
| 578 | - $this->dispatch('\OCA\Circles::onLinkRequestCanceled', ['circle' => $circle, 'link' => $link]); |
|
| 578 | + $this->dispatch('\OCA\Circles::onLinkRequestCanceled', ['circle' => $circle, 'link' => $link]); |
|
| 579 | 579 | } |
| 580 | 580 | |
| 581 | 581 | |
@@ -600,7 +600,7 @@ discard block |
||
| 600 | 600 | $link->getCircleId(), Member::LEVEL_MODERATOR, true |
| 601 | 601 | ) |
| 602 | 602 | ); |
| 603 | - $this->dispatch('\OCA\Circles::onLinkRequestAccepted', ['circle' => $circle, 'link' => $link]); |
|
| 603 | + $this->dispatch('\OCA\Circles::onLinkRequestAccepted', ['circle' => $circle, 'link' => $link]); |
|
| 604 | 604 | } |
| 605 | 605 | |
| 606 | 606 | |
@@ -625,7 +625,7 @@ discard block |
||
| 625 | 625 | $link->getCircleId(), Member::LEVEL_MODERATOR, true |
| 626 | 626 | ) |
| 627 | 627 | ); |
| 628 | - $this->dispatch('\OCA\Circles::onLinkRequestAccepting', ['circle' => $circle, 'link' => $link]); |
|
| 628 | + $this->dispatch('\OCA\Circles::onLinkRequestAccepting', ['circle' => $circle, 'link' => $link]); |
|
| 629 | 629 | } |
| 630 | 630 | |
| 631 | 631 | |
@@ -650,7 +650,7 @@ discard block |
||
| 650 | 650 | $link->getCircleId(), Member::LEVEL_MODERATOR, true |
| 651 | 651 | ) |
| 652 | 652 | ); |
| 653 | - $this->dispatch('\OCA\Circles::onLinkUp', ['circle' => $circle, 'link' => $link]); |
|
| 653 | + $this->dispatch('\OCA\Circles::onLinkUp', ['circle' => $circle, 'link' => $link]); |
|
| 654 | 654 | } |
| 655 | 655 | |
| 656 | 656 | |
@@ -675,7 +675,7 @@ discard block |
||
| 675 | 675 | $link->getCircleId(), Member::LEVEL_MODERATOR, true |
| 676 | 676 | ) |
| 677 | 677 | ); |
| 678 | - $this->dispatch('\OCA\Circles::onLinkDown', ['circle' => $circle, 'link' => $link]); |
|
| 678 | + $this->dispatch('\OCA\Circles::onLinkDown', ['circle' => $circle, 'link' => $link]); |
|
| 679 | 679 | } |
| 680 | 680 | |
| 681 | 681 | |
@@ -712,7 +712,7 @@ discard block |
||
| 712 | 712 | $link->getCircleId(), Member::LEVEL_MODERATOR, true |
| 713 | 713 | ) |
| 714 | 714 | ); |
| 715 | - $this->dispatch('\OCA\Circles::onLinkRemove', ['circle' => $circle, 'link' => $link]); |
|
| 715 | + $this->dispatch('\OCA\Circles::onLinkRemove', ['circle' => $circle, 'link' => $link]); |
|
| 716 | 716 | } |
| 717 | 717 | |
| 718 | 718 | /** |
@@ -724,7 +724,7 @@ discard block |
||
| 724 | 724 | * @param array $oldSettings |
| 725 | 725 | */ |
| 726 | 726 | public function onSettingsChange(Circle $circle, array $oldSettings = []) { |
| 727 | - $this->dispatch('\OCA\Circles::onSettingsChange', ['circle' => $circle, 'oldSettings' => $oldSettings]); |
|
| 727 | + $this->dispatch('\OCA\Circles::onSettingsChange', ['circle' => $circle, 'oldSettings' => $oldSettings]); |
|
| 728 | 728 | } |
| 729 | 729 | |
| 730 | 730 | |
@@ -775,7 +775,7 @@ discard block |
||
| 775 | 775 | * @param array $arguments |
| 776 | 776 | */ |
| 777 | 777 | private function dispatch($context, $arguments) { |
| 778 | - $this->eventDispatcher->dispatch($context, new GenericEvent(null,$arguments)); |
|
| 778 | + $this->eventDispatcher->dispatch($context, new GenericEvent(null, $arguments)); |
|
| 779 | 779 | } |
| 780 | 780 | |
| 781 | 781 | } |
@@ -157,7 +157,7 @@ discard block |
||
| 157 | 157 | } |
| 158 | 158 | } |
| 159 | 159 | |
| 160 | - $this->miscService->log('onCircleCreation: '. json_encode($this->circle), 1); |
|
| 160 | + $this->miscService->log('onCircleCreation: '.json_encode($this->circle), 1); |
|
| 161 | 161 | } |
| 162 | 162 | |
| 163 | 163 | /** |
@@ -172,7 +172,7 @@ discard block |
||
| 172 | 172 | $this->group->delete(); |
| 173 | 173 | } |
| 174 | 174 | |
| 175 | - $this->miscService->log('onCircleDestruction: '. json_encode($this->circle), 1); |
|
| 175 | + $this->miscService->log('onCircleDestruction: '.json_encode($this->circle), 1); |
|
| 176 | 176 | } |
| 177 | 177 | |
| 178 | 178 | /** |
@@ -192,21 +192,21 @@ discard block |
||
| 192 | 192 | } |
| 193 | 193 | } |
| 194 | 194 | |
| 195 | - $this->miscService->log('onMemberNew: '. json_encode($this->circle).json_encode($this->member), 1); |
|
| 195 | + $this->miscService->log('onMemberNew: '.json_encode($this->circle).json_encode($this->member), 1); |
|
| 196 | 196 | } |
| 197 | 197 | |
| 198 | 198 | /** |
| 199 | 199 | * @param GenericEvent $event |
| 200 | 200 | */ |
| 201 | 201 | public function onMemberInvited(GenericEvent $event) { |
| 202 | - $this->miscService->log('onMemberInvited: '. json_encode($event), 1); |
|
| 202 | + $this->miscService->log('onMemberInvited: '.json_encode($event), 1); |
|
| 203 | 203 | } |
| 204 | 204 | |
| 205 | 205 | /** |
| 206 | 206 | * @param GenericEvent $event |
| 207 | 207 | */ |
| 208 | 208 | public function onMemberRequesting(GenericEvent $event) { |
| 209 | - $this->miscService->log('onMemberRequesting: '. json_encode($event), 1); |
|
| 209 | + $this->miscService->log('onMemberRequesting: '.json_encode($event), 1); |
|
| 210 | 210 | } |
| 211 | 211 | |
| 212 | 212 | /** |
@@ -226,105 +226,105 @@ discard block |
||
| 226 | 226 | } |
| 227 | 227 | } |
| 228 | 228 | |
| 229 | - $this->miscService->log('onMemberLeaving: '. json_encode($this->circle).json_encode($this->member), 1); |
|
| 229 | + $this->miscService->log('onMemberLeaving: '.json_encode($this->circle).json_encode($this->member), 1); |
|
| 230 | 230 | } |
| 231 | 231 | |
| 232 | 232 | /** |
| 233 | 233 | * @param GenericEvent $event |
| 234 | 234 | */ |
| 235 | 235 | public function onMemberLevel(GenericEvent $event) { |
| 236 | - $this->miscService->log('onMemberLevel: '. json_encode($event), 1); |
|
| 236 | + $this->miscService->log('onMemberLevel: '.json_encode($event), 1); |
|
| 237 | 237 | } |
| 238 | 238 | |
| 239 | 239 | /** |
| 240 | 240 | * @param GenericEvent $event |
| 241 | 241 | */ |
| 242 | 242 | public function onMemberOwner(GenericEvent $event) { |
| 243 | - $this->miscService->log('onMemberOwner: '. json_encode($event), 1); |
|
| 243 | + $this->miscService->log('onMemberOwner: '.json_encode($event), 1); |
|
| 244 | 244 | } |
| 245 | 245 | |
| 246 | 246 | /** |
| 247 | 247 | * @param GenericEvent $event |
| 248 | 248 | */ |
| 249 | 249 | public function onGroupLink(GenericEvent $event) { |
| 250 | - $this->miscService->log('onGroupLink: '. json_encode($event), 1); |
|
| 250 | + $this->miscService->log('onGroupLink: '.json_encode($event), 1); |
|
| 251 | 251 | } |
| 252 | 252 | |
| 253 | 253 | /** |
| 254 | 254 | * @param GenericEvent $event |
| 255 | 255 | */ |
| 256 | 256 | public function onGroupUnlink(GenericEvent $event) { |
| 257 | - $this->miscService->log('onGroupUnlink: '. json_encode($event), 1); |
|
| 257 | + $this->miscService->log('onGroupUnlink: '.json_encode($event), 1); |
|
| 258 | 258 | } |
| 259 | 259 | |
| 260 | 260 | /** |
| 261 | 261 | * @param GenericEvent $event |
| 262 | 262 | */ |
| 263 | 263 | public function onGroupLevel(GenericEvent $event) { |
| 264 | - $this->miscService->log('onGroupLevel: '. json_encode($event), 1); |
|
| 264 | + $this->miscService->log('onGroupLevel: '.json_encode($event), 1); |
|
| 265 | 265 | } |
| 266 | 266 | |
| 267 | 267 | /** |
| 268 | 268 | * @param GenericEvent $event |
| 269 | 269 | */ |
| 270 | 270 | public function onLinkRequestSent(GenericEvent $event) { |
| 271 | - $this->miscService->log('onLinkRequestSent: '. json_encode($event), 1); |
|
| 271 | + $this->miscService->log('onLinkRequestSent: '.json_encode($event), 1); |
|
| 272 | 272 | } |
| 273 | 273 | |
| 274 | 274 | /** |
| 275 | 275 | * @param GenericEvent $event |
| 276 | 276 | */ |
| 277 | 277 | public function onLinkRequestReceived(GenericEvent $event) { |
| 278 | - $this->miscService->log('onLinkRequestReceived: '. json_encode($event), 1); |
|
| 278 | + $this->miscService->log('onLinkRequestReceived: '.json_encode($event), 1); |
|
| 279 | 279 | } |
| 280 | 280 | |
| 281 | 281 | /** |
| 282 | 282 | * @param GenericEvent $event |
| 283 | 283 | */ |
| 284 | 284 | public function onLinkRequestRejected(GenericEvent $event) { |
| 285 | - $this->miscService->log('onLinkRequestRejected: '. json_encode($event), 1); |
|
| 285 | + $this->miscService->log('onLinkRequestRejected: '.json_encode($event), 1); |
|
| 286 | 286 | } |
| 287 | 287 | |
| 288 | 288 | /** |
| 289 | 289 | * @param GenericEvent $event |
| 290 | 290 | */ |
| 291 | 291 | public function onLinkRequestCanceled(GenericEvent $event) { |
| 292 | - $this->miscService->log('onLinkRequestCanceled: '. json_encode($event), 1); |
|
| 292 | + $this->miscService->log('onLinkRequestCanceled: '.json_encode($event), 1); |
|
| 293 | 293 | } |
| 294 | 294 | |
| 295 | 295 | /** |
| 296 | 296 | * @param GenericEvent $event |
| 297 | 297 | */ |
| 298 | 298 | public function onLinkRequestAccepted(GenericEvent $event) { |
| 299 | - $this->miscService->log('onLinkRequestAccepted: '. json_encode($event), 1); |
|
| 299 | + $this->miscService->log('onLinkRequestAccepted: '.json_encode($event), 1); |
|
| 300 | 300 | } |
| 301 | 301 | |
| 302 | 302 | /** |
| 303 | 303 | * @param GenericEvent $event |
| 304 | 304 | */ |
| 305 | 305 | public function onLinkRequestAccepting(GenericEvent $event) { |
| 306 | - $this->miscService->log('onLinkRequestAccepting: '. json_encode($event), 1); |
|
| 306 | + $this->miscService->log('onLinkRequestAccepting: '.json_encode($event), 1); |
|
| 307 | 307 | } |
| 308 | 308 | |
| 309 | 309 | /** |
| 310 | 310 | * @param GenericEvent $event |
| 311 | 311 | */ |
| 312 | 312 | public function onLinkUp(GenericEvent $event) { |
| 313 | - $this->miscService->log('onLinkUp: '. json_encode($event), 1); |
|
| 313 | + $this->miscService->log('onLinkUp: '.json_encode($event), 1); |
|
| 314 | 314 | } |
| 315 | 315 | |
| 316 | 316 | /** |
| 317 | 317 | * @param GenericEvent $event |
| 318 | 318 | */ |
| 319 | 319 | public function onLinkDown(GenericEvent $event) { |
| 320 | - $this->miscService->log('onLinkDown: '. json_encode($event), 1); |
|
| 320 | + $this->miscService->log('onLinkDown: '.json_encode($event), 1); |
|
| 321 | 321 | } |
| 322 | 322 | |
| 323 | 323 | /** |
| 324 | 324 | * @param GenericEvent $event |
| 325 | 325 | */ |
| 326 | 326 | public function onLinkRemove(GenericEvent $event) { |
| 327 | - $this->miscService->log('onLinkRemove: '. json_encode($event), 1); |
|
| 327 | + $this->miscService->log('onLinkRemove: '.json_encode($event), 1); |
|
| 328 | 328 | } |
| 329 | 329 | |
| 330 | 330 | /** |
@@ -340,7 +340,7 @@ discard block |
||
| 340 | 340 | |
| 341 | 341 | $this->setCircleGroupName($this->getCircleGroupName()); |
| 342 | 342 | |
| 343 | - $this->miscService->log('onSettingsChange: '. json_encode($this->circle).json_encode($oldSettings), 1); |
|
| 343 | + $this->miscService->log('onSettingsChange: '.json_encode($this->circle).json_encode($oldSettings), 1); |
|
| 344 | 344 | } |
| 345 | 345 | |
| 346 | 346 | /** |
@@ -433,7 +433,7 @@ discard block |
||
| 433 | 433 | protected function setCircleGroupName($displayName) |
| 434 | 434 | { |
| 435 | 435 | if ($this->group && method_exists($this->group, 'setDisplayName')) { |
| 436 | - $this->miscService->log('setCircleGroupName: '. json_encode($displayName), 1); |
|
| 436 | + $this->miscService->log('setCircleGroupName: '.json_encode($displayName), 1); |
|
| 437 | 437 | return $this->group->setDisplayName($displayName); |
| 438 | 438 | } |
| 439 | 439 | |
@@ -532,24 +532,24 @@ discard block |
||
| 532 | 532 | switch ($type) { |
| 533 | 533 | case Circle::CIRCLES_PERSONAL: |
| 534 | 534 | return $urlGen->getAbsoluteURL( |
| 535 | - $urlGen->imagePath(Application::APP_NAME, 'personal' . $ext) |
|
| 535 | + $urlGen->imagePath(Application::APP_NAME, 'personal'.$ext) |
|
| 536 | 536 | ); |
| 537 | 537 | case Circle::CIRCLES_CLOSED: |
| 538 | 538 | return $urlGen->getAbsoluteURL( |
| 539 | - $urlGen->imagePath(Application::APP_NAME, 'closed' . $ext) |
|
| 539 | + $urlGen->imagePath(Application::APP_NAME, 'closed'.$ext) |
|
| 540 | 540 | ); |
| 541 | 541 | case Circle::CIRCLES_SECRET: |
| 542 | 542 | return $urlGen->getAbsoluteURL( |
| 543 | - $urlGen->imagePath(Application::APP_NAME, 'secret' . $ext) |
|
| 543 | + $urlGen->imagePath(Application::APP_NAME, 'secret'.$ext) |
|
| 544 | 544 | ); |
| 545 | 545 | case Circle::CIRCLES_PUBLIC: |
| 546 | 546 | return $urlGen->getAbsoluteURL( |
| 547 | - $urlGen->imagePath(Application::APP_NAME, 'black_circle' . $ext) |
|
| 547 | + $urlGen->imagePath(Application::APP_NAME, 'black_circle'.$ext) |
|
| 548 | 548 | ); |
| 549 | 549 | } |
| 550 | 550 | |
| 551 | 551 | return $urlGen->getAbsoluteURL( |
| 552 | - $urlGen->imagePath(Application::APP_NAME, 'black_circle' . $ext) |
|
| 552 | + $urlGen->imagePath(Application::APP_NAME, 'black_circle'.$ext) |
|
| 553 | 553 | ); |
| 554 | 554 | } |
| 555 | 555 | |
@@ -585,7 +585,7 @@ discard block |
||
| 585 | 585 | $circle->getUniqueId(), Member::LEVEL_MEMBER, true |
| 586 | 586 | ); |
| 587 | 587 | |
| 588 | - $limit = (int) $circle->getSetting('members_limit'); |
|
| 588 | + $limit = (int)$circle->getSetting('members_limit'); |
|
| 589 | 589 | if ($limit === -1) { |
| 590 | 590 | return; |
| 591 | 591 | } |
@@ -137,7 +137,7 @@ |
||
| 137 | 137 | $count++; |
| 138 | 138 | } |
| 139 | 139 | |
| 140 | - $limit = (int) $circle->getSetting('members_limit'); |
|
| 140 | + $limit = (int)$circle->getSetting('members_limit'); |
|
| 141 | 141 | if ($limit === 0) { |
| 142 | 142 | $limit = $this->configService->getAppValue(ConfigService::CIRCLES_MEMBERS_LIMIT); |
| 143 | 143 | } |
@@ -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, '/'); |
@@ -467,7 +467,7 @@ discard block |
||
| 467 | 467 | */ |
| 468 | 468 | public function getGroupBackendNamePrefix() { |
| 469 | 469 | if ($this->groupBackendNamePrefix === null && $this->isGroupsBackend()) { |
| 470 | - $this->groupBackendNamePrefix = ltrim((string) $this->getAppValue(self::CIRCLES_GROUP_BACKEND_NAME_PREFIX)); |
|
| 470 | + $this->groupBackendNamePrefix = ltrim((string)$this->getAppValue(self::CIRCLES_GROUP_BACKEND_NAME_PREFIX)); |
|
| 471 | 471 | } |
| 472 | 472 | |
| 473 | 473 | return $this->groupBackendNamePrefix; |
@@ -482,7 +482,7 @@ discard block |
||
| 482 | 482 | if ($this->groupBackendNameSuffix === null && $this->isGroupsBackend()) { |
| 483 | 483 | $l = OC::$server->getL10N('circles'); |
| 484 | 484 | $defaultSuffix = ' '.$l->t('Circle'); |
| 485 | - $customSuffix = (string) $this->getAppValue(self::CIRCLES_GROUP_BACKEND_NAME_SUFFIX; |
|
| 485 | + $customSuffix = (string)$this->getAppValue(self::CIRCLES_GROUP_BACKEND_NAME_SUFFIX; |
|
| 486 | 486 | $this->groupBackendNameSuffix = rtrim($customSuffix ?: $defaultSuffix); |
| 487 | 487 | } |
| 488 | 488 | |