@@ -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 | |
@@ -496,7 +496,7 @@ discard block |
||
| 496 | 496 | |
| 497 | 497 | $i = 1; |
| 498 | 498 | while (true) { |
| 499 | - $testDisplayName = $baseDisplayName . (($i > 1) ? ' (' . $i . ')' : ''); |
|
| 499 | + $testDisplayName = $baseDisplayName.(($i > 1) ? ' ('.$i.')' : ''); |
|
| 500 | 500 | $test = new Circle(); |
| 501 | 501 | $test->setDisplayName($testDisplayName); |
| 502 | 502 | |
@@ -529,7 +529,7 @@ discard block |
||
| 529 | 529 | |
| 530 | 530 | $i = 1; |
| 531 | 531 | while (true) { |
| 532 | - $testSanitizedName = $baseSanitizedName . (($i > 1) ? ' (' . $i . ')' : ''); |
|
| 532 | + $testSanitizedName = $baseSanitizedName.(($i > 1) ? ' ('.$i.')' : ''); |
|
| 533 | 533 | |
| 534 | 534 | $test = new Circle(); |
| 535 | 535 | $test->setSanitizedName($testSanitizedName); |
@@ -91,11 +91,11 @@ |
||
| 91 | 91 | |
| 92 | 92 | $circle = $event->getCircle(); |
| 93 | 93 | $member = $event->getMember(); |
| 94 | - $info .= 'circleId: ' . $circle->getSingleId() . '; userId: ' . $member->getUserId() . '; userType: ' |
|
| 95 | - . Member::$TYPE[$member->getUserType()] . '; singleId: ' . $member->getSingleId() |
|
| 96 | - . '; memberId: ' . $member->getId() . '; isLocal: ' . json_encode($member->isLocal()) . '; '; |
|
| 94 | + $info .= 'circleId: '.$circle->getSingleId().'; userId: '.$member->getUserId().'; userType: ' |
|
| 95 | + . Member::$TYPE[$member->getUserType()].'; singleId: '.$member->getSingleId() |
|
| 96 | + . '; memberId: '.$member->getId().'; isLocal: '.json_encode($member->isLocal()).'; '; |
|
| 97 | 97 | |
| 98 | - $this->log(3, $prefix . $info); |
|
| 98 | + $this->log(3, $prefix.$info); |
|
| 99 | 99 | } |
| 100 | 100 | |
| 101 | 101 | } |
@@ -250,7 +250,7 @@ discard block |
||
| 250 | 250 | * @throws SingleCircleNotFoundException |
| 251 | 251 | */ |
| 252 | 252 | public function syncNextcloudUser(string $userId): FederatedUser { |
| 253 | - $this->outputService->output('Syncing Nextcloud User \'' . $userId . '\'', true); |
|
| 253 | + $this->outputService->output('Syncing Nextcloud User \''.$userId.'\'', true); |
|
| 254 | 254 | |
| 255 | 255 | return $this->federatedUserService->getLocalFederatedUser($userId); |
| 256 | 256 | } |
@@ -294,7 +294,7 @@ discard block |
||
| 294 | 294 | * @throws RequestBuilderException |
| 295 | 295 | */ |
| 296 | 296 | public function syncNextcloudGroup(string $groupId): Circle { |
| 297 | - $this->outputService->output('Syncing Nextcloud Group \'' . $groupId . '\'', true); |
|
| 297 | + $this->outputService->output('Syncing Nextcloud Group \''.$groupId.'\'', true); |
|
| 298 | 298 | |
| 299 | 299 | $circle = $this->federatedUserService->getGroupCircle($groupId); |
| 300 | 300 | $group = $this->groupManager->get($groupId); |
@@ -363,7 +363,7 @@ discard block |
||
| 363 | 363 | */ |
| 364 | 364 | public function groupDeleted(string $groupId): void { |
| 365 | 365 | $circle = new Circle(); |
| 366 | - $circle->setName('group:' . $groupId) |
|
| 366 | + $circle->setName('group:'.$groupId) |
|
| 367 | 367 | ->setConfig(Circle::CFG_SYSTEM | Circle::CFG_NO_OWNER | Circle::CFG_HIDDEN) |
| 368 | 368 | ->setSource(Member::TYPE_GROUP); |
| 369 | 369 | |
@@ -82,14 +82,14 @@ |
||
| 82 | 82 | */ |
| 83 | 83 | public function output(string $message, bool $advance = false): void { |
| 84 | 84 | if (!is_null($this->occOutput)) { |
| 85 | - $this->occOutput->writeln((($advance) ? '+' : '-') . ' ' . $message); |
|
| 85 | + $this->occOutput->writeln((($advance) ? '+' : '-').' '.$message); |
|
| 86 | 86 | } |
| 87 | 87 | |
| 88 | 88 | if (!is_null($this->migrationOutput)) { |
| 89 | 89 | if ($advance) { |
| 90 | - $this->migrationOutput->advance(1, '(Circles) ' . $message); |
|
| 90 | + $this->migrationOutput->advance(1, '(Circles) '.$message); |
|
| 91 | 91 | } else { |
| 92 | - $this->migrationOutput->info('(Circles) ' . $message); |
|
| 92 | + $this->migrationOutput->info('(Circles) '.$message); |
|
| 93 | 93 | } |
| 94 | 94 | } |
| 95 | 95 | } |
@@ -226,7 +226,7 @@ |
||
| 226 | 226 | Circle::$DEF_SOURCE[$circle->getSource()], |
| 227 | 227 | $this->cut($displayName ? $owner->getDisplayName() : $owner->getUserId(), 40), |
| 228 | 228 | $this->configService->displayInstance($owner->getInstance()), |
| 229 | - $circle->getPopulation() . '/' . $this->getInt( |
|
| 229 | + $circle->getPopulation().'/'.$this->getInt( |
|
| 230 | 230 | 'members_limit', $circle->getSettings(), -1 |
| 231 | 231 | ) |
| 232 | 232 | ] |
@@ -305,18 +305,18 @@ |
||
| 305 | 305 | * @throws MembershipNotFoundException |
| 306 | 306 | */ |
| 307 | 307 | public function importFromDatabase(array $data, string $prefix = ''): INC22QueryRow { |
| 308 | - if ($this->get($prefix . 'single_id', $data) === '') { |
|
| 308 | + if ($this->get($prefix.'single_id', $data) === '') { |
|
| 309 | 309 | throw new MembershipNotFoundException(); |
| 310 | 310 | } |
| 311 | 311 | |
| 312 | - $this->setSingleId($this->get($prefix . 'single_id', $data)); |
|
| 313 | - $this->setCircleId($this->get($prefix . 'circle_id', $data)); |
|
| 314 | - $this->setLevel($this->getInt($prefix . 'level', $data)); |
|
| 315 | - $this->setCircleConfig($this->getInt($prefix . 'circle_config', $data)); |
|
| 316 | - $this->setInheritanceFirst($this->get($prefix . 'inheritance_first', $data)); |
|
| 317 | - $this->setInheritanceLast($this->get($prefix . 'inheritance_last', $data)); |
|
| 318 | - $this->setInheritancePath($this->getArray($prefix . 'inheritance_path', $data)); |
|
| 319 | - $this->setInheritanceDepth($this->getInt($prefix . 'inheritance_depth', $data)); |
|
| 312 | + $this->setSingleId($this->get($prefix.'single_id', $data)); |
|
| 313 | + $this->setCircleId($this->get($prefix.'circle_id', $data)); |
|
| 314 | + $this->setLevel($this->getInt($prefix.'level', $data)); |
|
| 315 | + $this->setCircleConfig($this->getInt($prefix.'circle_config', $data)); |
|
| 316 | + $this->setInheritanceFirst($this->get($prefix.'inheritance_first', $data)); |
|
| 317 | + $this->setInheritanceLast($this->get($prefix.'inheritance_last', $data)); |
|
| 318 | + $this->setInheritancePath($this->getArray($prefix.'inheritance_path', $data)); |
|
| 319 | + $this->setInheritanceDepth($this->getInt($prefix.'inheritance_depth', $data)); |
|
| 320 | 320 | |
| 321 | 321 | return $this; |
| 322 | 322 | } |
@@ -194,7 +194,7 @@ |
||
| 194 | 194 | throw new OCSException('works only from local instance', 404); |
| 195 | 195 | } |
| 196 | 196 | |
| 197 | - $userId = $currentUser->getUserId() . '/' . $userId; |
|
| 197 | + $userId = $currentUser->getUserId().'/'.$userId; |
|
| 198 | 198 | } |
| 199 | 199 | |
| 200 | 200 | $federatedUser = $this->federatedUserService->generateFederatedUser($userId, $type); |
@@ -648,9 +648,9 @@ discard block |
||
| 648 | 648 | |
| 649 | 649 | $display = $circle->getDisplayName(); |
| 650 | 650 | if ($circle->getSource() === Member::TYPE_CIRCLE) { |
| 651 | - $display .= ' (Circle owned by ' . $circle->getOwner()->getDisplayName() . ')'; |
|
| 651 | + $display .= ' (Circle owned by '.$circle->getOwner()->getDisplayName().')'; |
|
| 652 | 652 | } else { |
| 653 | - $display .= ' (' . Circle::$DEF_SOURCE[$circle->getSource()] . ')'; |
|
| 653 | + $display .= ' ('.Circle::$DEF_SOURCE[$circle->getSource()].')'; |
|
| 654 | 654 | } |
| 655 | 655 | |
| 656 | 656 | $share->setSharedWithDisplayName($display); |
@@ -740,20 +740,20 @@ discard block |
||
| 740 | 740 | */ |
| 741 | 741 | public function importFromDatabase(array $data, string $prefix = ''): INC22QueryRow { |
| 742 | 742 | $shareTime = new DateTime(); |
| 743 | - $shareTime->setTimestamp($this->getInt($prefix . 'stime', $data)); |
|
| 744 | - |
|
| 745 | - $this->setId($this->get($prefix . 'id', $data)) |
|
| 746 | - ->setShareType($this->getInt($prefix . 'share_type', $data)) |
|
| 747 | - ->setPermissions($this->getInt($prefix . 'permissions', $data)) |
|
| 748 | - ->setItemType($this->get($prefix . 'item_type', $data)) |
|
| 749 | - ->setItemSource($this->getInt($prefix . 'item_source', $data)) |
|
| 750 | - ->setItemTarget($this->get($prefix . 'item_target', $data)) |
|
| 751 | - ->setFileSource($this->getInt($prefix . 'file_source', $data)) |
|
| 752 | - ->setFileTarget($this->get($prefix . 'file_target', $data)) |
|
| 753 | - ->setSharedWith($this->get($prefix . 'share_with', $data)) |
|
| 754 | - ->setSharedBy($this->get($prefix . 'uid_initiator', $data)) |
|
| 755 | - ->setShareOwner($this->get($prefix . 'uid_owner', $data)) |
|
| 756 | - ->setToken($this->get($prefix . 'token', $data)) |
|
| 743 | + $shareTime->setTimestamp($this->getInt($prefix.'stime', $data)); |
|
| 744 | + |
|
| 745 | + $this->setId($this->get($prefix.'id', $data)) |
|
| 746 | + ->setShareType($this->getInt($prefix.'share_type', $data)) |
|
| 747 | + ->setPermissions($this->getInt($prefix.'permissions', $data)) |
|
| 748 | + ->setItemType($this->get($prefix.'item_type', $data)) |
|
| 749 | + ->setItemSource($this->getInt($prefix.'item_source', $data)) |
|
| 750 | + ->setItemTarget($this->get($prefix.'item_target', $data)) |
|
| 751 | + ->setFileSource($this->getInt($prefix.'file_source', $data)) |
|
| 752 | + ->setFileTarget($this->get($prefix.'file_target', $data)) |
|
| 753 | + ->setSharedWith($this->get($prefix.'share_with', $data)) |
|
| 754 | + ->setSharedBy($this->get($prefix.'uid_initiator', $data)) |
|
| 755 | + ->setShareOwner($this->get($prefix.'uid_owner', $data)) |
|
| 756 | + ->setToken($this->get($prefix.'token', $data)) |
|
| 757 | 757 | ->setShareTime($shareTime); |
| 758 | 758 | |
| 759 | 759 | // if (($password = $this->get('personal_password', $data, '')) !== '') { |
@@ -762,9 +762,9 @@ discard block |
||
| 762 | 762 | // $share->setPassword($this->get('password', $data, '')); |
| 763 | 763 | // } |
| 764 | 764 | |
| 765 | - $this->setChildId($this->getInt($prefix . 'child_id', $data)) |
|
| 766 | - ->setChildFileTarget($this->get($prefix . 'child_file_target', $data)) |
|
| 767 | - ->setChildPermissions($this->getInt($prefix . 'child_permissions', $data)) |
|
| 765 | + $this->setChildId($this->getInt($prefix.'child_id', $data)) |
|
| 766 | + ->setChildFileTarget($this->get($prefix.'child_file_target', $data)) |
|
| 767 | + ->setChildPermissions($this->getInt($prefix.'child_permissions', $data)) |
|
| 768 | 768 | ->setProviderId(ShareByCircleProvider::IDENTIFIER) |
| 769 | 769 | ->setStatus(Ishare::STATUS_ACCEPTED); |
| 770 | 770 | |