@@ -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 |
@@ -394,7 +394,7 @@ discard block |
||
394 | 394 | if ($check) { |
395 | 395 | $user = $this->userManager->get($userId); |
396 | 396 | if ($user === null) { |
397 | - throw new FederatedUserNotFoundException('user ' . $userId . ' not found'); |
|
397 | + throw new FederatedUserNotFoundException('user '.$userId.' not found'); |
|
398 | 398 | } |
399 | 399 | $userId = $user->getUID(); |
400 | 400 | $displayName = $user->getDisplayName(); |
@@ -852,7 +852,7 @@ discard block |
||
852 | 852 | $prefix = ($federatedUser->getUserType() === Member::TYPE_APP) ? 'app' |
853 | 853 | : Member::$TYPE[$federatedUser->getUserType()]; |
854 | 854 | |
855 | - $circle->setName($prefix . ':' . $federatedUser->getUserId() . ':' . $id) |
|
855 | + $circle->setName($prefix.':'.$federatedUser->getUserId().':'.$id) |
|
856 | 856 | ->setDisplayName($federatedUser->getDisplayName()) |
857 | 857 | ->setSingleId($id) |
858 | 858 | ->setSource($source); |
@@ -976,7 +976,7 @@ discard block |
||
976 | 976 | $owner = $this->getCurrentApp(); |
977 | 977 | |
978 | 978 | $circle = new Circle(); |
979 | - $circle->setName('group:' . $groupId) |
|
979 | + $circle->setName('group:'.$groupId) |
|
980 | 980 | ->setConfig(Circle::CFG_SYSTEM | Circle::CFG_NO_OWNER | Circle::CFG_HIDDEN) |
981 | 981 | ->setSingleId($this->token(ManagedModel::ID_LENGTH)) |
982 | 982 | ->setSource(Member::TYPE_GROUP); |
@@ -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); |