@@ -168,7 +168,7 @@ |
||
168 | 168 | public function registerFilesNavigation() { |
169 | 169 | $appManager = FilesApp::getNavigationManager(); |
170 | 170 | $appManager->add( |
171 | - function () { |
|
171 | + function() { |
|
172 | 172 | $l = OC::$server->getL10N('circles'); |
173 | 173 | |
174 | 174 | return [ |
@@ -456,7 +456,7 @@ discard block |
||
456 | 456 | } |
457 | 457 | |
458 | 458 | $path = $this->getPath(); |
459 | - [$storageType,] = explode('::', $this->getStorage(), 2); |
|
459 | + [$storageType, ] = explode('::', $this->getStorage(), 2); |
|
460 | 460 | |
461 | 461 | if ($path === '') { |
462 | 462 | // we only accept empty path on external storage |
@@ -508,29 +508,29 @@ discard block |
||
508 | 508 | * @throws FileCacheNotFoundException |
509 | 509 | */ |
510 | 510 | public function importFromDatabase(array $data, string $prefix = ''): IQueryRow { |
511 | - if ($this->getInt($prefix . 'fileid', $data) === 0) { |
|
511 | + if ($this->getInt($prefix.'fileid', $data) === 0) { |
|
512 | 512 | throw new FileCacheNotFoundException(); |
513 | 513 | } |
514 | 514 | |
515 | - $this->setId($this->getInt($prefix . 'fileid', $data)); |
|
516 | - $this->setPath($this->get($prefix . 'path', $data)); |
|
517 | - $this->setPermissions($this->getInt($prefix . 'permissions', $data)); |
|
518 | - $this->setStorageId($this->getInt($prefix . 'storage', $data)); |
|
519 | - $this->setPathHash($this->get($prefix . 'path_hash', $data)); |
|
520 | - $this->setParent($this->getInt($prefix . 'parent', $data)); |
|
521 | - $this->setName($this->get($prefix . 'name', $data)); |
|
522 | - $this->setMimeType($this->getInt($prefix . 'mimetype', $data)); |
|
523 | - $this->setMimePart($this->getInt($prefix . 'mimepart', $data)); |
|
524 | - $this->setSize($this->getInt($prefix . 'size', $data)); |
|
525 | - $this->setMTime($this->getInt($prefix . 'mtime', $data)); |
|
526 | - $this->setStorageMTime($this->getInt($prefix . 'storage_mtime', $data)); |
|
527 | - $this->setEncrypted($this->getBool($prefix . 'encrypted', $data)); |
|
528 | - $this->setUnencryptedSize($this->getInt($prefix . 'unencrypted_size', $data)); |
|
529 | - $this->setEtag($this->get($prefix . 'etag', $data)); |
|
530 | - $this->setChecksum($this->get($prefix . 'checksum', $data)); |
|
515 | + $this->setId($this->getInt($prefix.'fileid', $data)); |
|
516 | + $this->setPath($this->get($prefix.'path', $data)); |
|
517 | + $this->setPermissions($this->getInt($prefix.'permissions', $data)); |
|
518 | + $this->setStorageId($this->getInt($prefix.'storage', $data)); |
|
519 | + $this->setPathHash($this->get($prefix.'path_hash', $data)); |
|
520 | + $this->setParent($this->getInt($prefix.'parent', $data)); |
|
521 | + $this->setName($this->get($prefix.'name', $data)); |
|
522 | + $this->setMimeType($this->getInt($prefix.'mimetype', $data)); |
|
523 | + $this->setMimePart($this->getInt($prefix.'mimepart', $data)); |
|
524 | + $this->setSize($this->getInt($prefix.'size', $data)); |
|
525 | + $this->setMTime($this->getInt($prefix.'mtime', $data)); |
|
526 | + $this->setStorageMTime($this->getInt($prefix.'storage_mtime', $data)); |
|
527 | + $this->setEncrypted($this->getBool($prefix.'encrypted', $data)); |
|
528 | + $this->setUnencryptedSize($this->getInt($prefix.'unencrypted_size', $data)); |
|
529 | + $this->setEtag($this->get($prefix.'etag', $data)); |
|
530 | + $this->setChecksum($this->get($prefix.'checksum', $data)); |
|
531 | 531 | |
532 | 532 | // small hack as there is no reason to call a recursive method for a single entry from the table |
533 | - $this->setStorage($this->get($prefix . CoreQueryBuilder::STORAGES . '_id', $data)); |
|
533 | + $this->setStorage($this->get($prefix.CoreQueryBuilder::STORAGES.'_id', $data)); |
|
534 | 534 | |
535 | 535 | return $this; |
536 | 536 | } |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | $this->parseAsNonMember($event, $circle); |
69 | 69 | $this->parseAsMember($event, $circle, $params); |
70 | 70 | $this->parseAsModerator($event, $circle, $params); |
71 | - } catch (FakeException|InvalidItemException $e) { |
|
71 | + } catch (FakeException | InvalidItemException $e) { |
|
72 | 72 | /** clean exit */ |
73 | 73 | } |
74 | 74 | |
@@ -95,7 +95,7 @@ discard block |
||
95 | 95 | private function setIcon(IEvent $event): void { |
96 | 96 | $path = $this->urlGenerator->imagePath( |
97 | 97 | Application::APP_ID, |
98 | - 'circles.' . $this->activityManager->getRequirePNG() ? 'png' : 'svg' |
|
98 | + 'circles.'.$this->activityManager->getRequirePNG() ? 'png' : 'svg' |
|
99 | 99 | ); |
100 | 100 | $event->setIcon($this->urlGenerator->getAbsoluteURL($path)); |
101 | 101 | } |
@@ -126,7 +126,7 @@ discard block |
||
126 | 126 | continue; |
127 | 127 | } |
128 | 128 | |
129 | - $replace['{' . $k . '}'] = $data[$k]['_parsed']; |
|
129 | + $replace['{'.$k.'}'] = $data[$k]['_parsed']; |
|
130 | 130 | } |
131 | 131 | |
132 | 132 | $event->setParsedSubject(strtr($line, $replace)); |
@@ -270,7 +270,7 @@ discard block |
||
270 | 270 | return [ |
271 | 271 | 'type' => Member::$TYPE[$member->getUserType()] ?? '', |
272 | 272 | 'id' => $member->getUserId(), |
273 | - 'name' => $member->getDisplayName() . ' (' . (Member::$TYPE[$member->getUserType()] ?? '') . ')', |
|
273 | + 'name' => $member->getDisplayName().' ('.(Member::$TYPE[$member->getUserType()] ?? '').')', |
|
274 | 274 | '_parsed' => $member->getDisplayName() |
275 | 275 | ]; |
276 | 276 | } |
@@ -75,7 +75,7 @@ |
||
75 | 75 | $event->setSubject('circle_create', ['circle' => json_encode($circle)]); |
76 | 76 | |
77 | 77 | $this->userManager->callForSeenUsers( |
78 | - function ($user) use ($event) { |
|
78 | + function($user) use ($event) { |
|
79 | 79 | /** @var IUser $user */ |
80 | 80 | $this->publishEvent($event, [$user]); |
81 | 81 | } |
@@ -163,7 +163,7 @@ discard block |
||
163 | 163 | */ |
164 | 164 | public function result(FederatedEvent $event, array $results): void { |
165 | 165 | $member = $event->getMember(); |
166 | - \OC::$server->getLogger()->log(3, '>> ' . $member->getStatus()); |
|
166 | + \OC::$server->getLogger()->log(3, '>> '.$member->getStatus()); |
|
167 | 167 | if ($member->getStatus() === Member::STATUS_INVITED) { |
168 | 168 | $this->eventService->memberInvited($event, $results); |
169 | 169 | } else { |
@@ -197,10 +197,10 @@ discard block |
||
197 | 197 | protected function generateMember(FederatedEvent $event, Circle $circle, Member $member): Member { |
198 | 198 | try { |
199 | 199 | if ($member->getSingleId() !== '') { |
200 | - $userId = $member->getSingleId() . '@' . $member->getInstance(); |
|
200 | + $userId = $member->getSingleId().'@'.$member->getInstance(); |
|
201 | 201 | $federatedUser = $this->federatedUserService->getFederatedUser($userId, Member::TYPE_SINGLE); |
202 | 202 | } else { |
203 | - $userId = $member->getUserId() . '@' . $member->getInstance(); |
|
203 | + $userId = $member->getUserId().'@'.$member->getInstance(); |
|
204 | 204 | $federatedUser = $this->federatedUserService->getFederatedUser( |
205 | 205 | $userId, |
206 | 206 | $member->getUserType() |
@@ -246,7 +246,7 @@ discard block |
||
246 | 246 | * @throws SingleCircleNotFoundException |
247 | 247 | */ |
248 | 248 | public function syncNextcloudUser(string $userId): FederatedUser { |
249 | - $this->outputService->output('Syncing Nextcloud Account \'' . $userId . '\'', true); |
|
249 | + $this->outputService->output('Syncing Nextcloud Account \''.$userId.'\'', true); |
|
250 | 250 | |
251 | 251 | return $this->federatedUserService->getLocalFederatedUser($userId, false, true); |
252 | 252 | } |
@@ -290,10 +290,10 @@ discard block |
||
290 | 290 | * @throws RequestBuilderException |
291 | 291 | */ |
292 | 292 | public function syncNextcloudGroup(string $groupId): Circle { |
293 | - $this->outputService->output('Syncing Nextcloud Group \'' . $groupId . '\'', true); |
|
293 | + $this->outputService->output('Syncing Nextcloud Group \''.$groupId.'\'', true); |
|
294 | 294 | |
295 | 295 | $circle = $this->federatedUserService->getGroupCircle($groupId); |
296 | - $members = array_map(function (Member $member): string { |
|
296 | + $members = array_map(function(Member $member): string { |
|
297 | 297 | return $member->getSingleId(); |
298 | 298 | }, $this->memberRequest->getMembers($circle->getSingleId())); |
299 | 299 | |
@@ -371,7 +371,7 @@ discard block |
||
371 | 371 | */ |
372 | 372 | public function groupDeleted(string $groupId): void { |
373 | 373 | $circle = new Circle(); |
374 | - $circle->setName('group:' . $groupId) |
|
374 | + $circle->setName('group:'.$groupId) |
|
375 | 375 | ->setConfig(Circle::CFG_SYSTEM | Circle::CFG_NO_OWNER | Circle::CFG_HIDDEN) |
376 | 376 | ->setSource(Member::TYPE_GROUP); |
377 | 377 |
@@ -528,7 +528,7 @@ discard block |
||
528 | 528 | if ($check) { |
529 | 529 | $user = $this->userManager->get($userId); |
530 | 530 | if ($user === null) { |
531 | - throw new FederatedUserNotFoundException('user ' . $userId . ' not found'); |
|
531 | + throw new FederatedUserNotFoundException('user '.$userId.' not found'); |
|
532 | 532 | } |
533 | 533 | $displayName = $this->userManager->getDisplayName($userId); |
534 | 534 | } else { |
@@ -1043,7 +1043,7 @@ discard block |
||
1043 | 1043 | $prefix = ($federatedUser->getUserType() === Member::TYPE_APP) ? 'app' |
1044 | 1044 | : Member::$TYPE[$federatedUser->getUserType()]; |
1045 | 1045 | |
1046 | - $circle->setName($prefix . ':' . $federatedUser->getUserId() . ':' . $id) |
|
1046 | + $circle->setName($prefix.':'.$federatedUser->getUserId().':'.$id) |
|
1047 | 1047 | ->setDisplayName($federatedUser->getDisplayName()) |
1048 | 1048 | ->setSingleId($id) |
1049 | 1049 | ->setSource($source); |
@@ -1247,7 +1247,7 @@ discard block |
||
1247 | 1247 | $owner = $this->getCurrentApp(); |
1248 | 1248 | |
1249 | 1249 | $circle = new Circle(); |
1250 | - $circle->setName('group:' . $groupId) |
|
1250 | + $circle->setName('group:'.$groupId) |
|
1251 | 1251 | ->setConfig(Circle::CFG_SYSTEM | Circle::CFG_NO_OWNER | Circle::CFG_HIDDEN) |
1252 | 1252 | ->setSingleId($this->token(ManagedModel::ID_LENGTH)) |
1253 | 1253 | ->setSource(Member::TYPE_GROUP); |
@@ -1315,8 +1315,8 @@ discard block |
||
1315 | 1315 | * @return string |
1316 | 1316 | */ |
1317 | 1317 | private function generateCacheKey(FederatedUser $federatedUser): string { |
1318 | - return $federatedUser->getInstance() . '#' |
|
1319 | - . $federatedUser->getUserType() . '#' |
|
1318 | + return $federatedUser->getInstance().'#' |
|
1319 | + . $federatedUser->getUserType().'#' |
|
1320 | 1320 | . $federatedUser->getUserId(); |
1321 | 1321 | } |
1322 | 1322 | } |
@@ -184,8 +184,8 @@ |
||
184 | 184 | $qb->filterCircles(CoreQueryBuilder::CIRCLE, $probe); |
185 | 185 | if (!is_null($initiator)) { |
186 | 186 | $qb->limitToInitiator(CoreQueryBuilder::CIRCLE, $initiator); |
187 | - $qb->orderBy($qb->generateAlias(CoreQueryBuilder::CIRCLE, CoreQueryBuilder::INITIATOR) . '.level', 'desc'); |
|
188 | - $qb->addOrderBy(CoreQueryBuilder::CIRCLE . '.display_name', 'asc'); |
|
187 | + $qb->orderBy($qb->generateAlias(CoreQueryBuilder::CIRCLE, CoreQueryBuilder::INITIATOR).'.level', 'desc'); |
|
188 | + $qb->addOrderBy(CoreQueryBuilder::CIRCLE.'.display_name', 'asc'); |
|
189 | 189 | } |
190 | 190 | if ($probe->hasFilterMember()) { |
191 | 191 | $qb->limitToDirectMembership(CoreQueryBuilder::CIRCLE, $probe->getFilterMember()); |