@@ -580,7 +580,7 @@ discard block |
||
| 580 | 580 | |
| 581 | 581 | $i = 1; |
| 582 | 582 | while (true) { |
| 583 | - $testDisplayName = $baseDisplayName . (($i > 1) ? ' (' . $i . ')' : ''); |
|
| 583 | + $testDisplayName = $baseDisplayName.(($i > 1) ? ' ('.$i.')' : ''); |
|
| 584 | 584 | $test = new Circle(); |
| 585 | 585 | $test->setDisplayName($testDisplayName); |
| 586 | 586 | |
@@ -613,7 +613,7 @@ discard block |
||
| 613 | 613 | |
| 614 | 614 | $i = 1; |
| 615 | 615 | while (true) { |
| 616 | - $testSanitizedName = $baseSanitizedName . (($i > 1) ? ' (' . $i . ')' : ''); |
|
| 616 | + $testSanitizedName = $baseSanitizedName.(($i > 1) ? ' ('.$i.')' : ''); |
|
| 617 | 617 | |
| 618 | 618 | $test = new Circle(); |
| 619 | 619 | $test->setSanitizedName($testSanitizedName); |
@@ -755,7 +755,7 @@ discard block |
||
| 755 | 755 | |
| 756 | 756 | |
| 757 | 757 | private function generateGetCirclesCacheKey(FederatedUser $federatedUser, string $probeSum): string { |
| 758 | - return $federatedUser->getSingleId() . '#' . $probeSum; |
|
| 758 | + return $federatedUser->getSingleId().'#'.$probeSum; |
|
| 759 | 759 | } |
| 760 | 760 | |
| 761 | 761 | |
@@ -98,7 +98,7 @@ discard block |
||
| 98 | 98 | $singleIds = array_merge( |
| 99 | 99 | [$circle->getSingleId()], |
| 100 | 100 | array_map( |
| 101 | - function (Membership $membership) { |
|
| 101 | + function(Membership $membership) { |
|
| 102 | 102 | return $membership->getCircleId(); |
| 103 | 103 | }, $circle->getMemberships() |
| 104 | 104 | ) |
@@ -152,7 +152,7 @@ discard block |
||
| 152 | 152 | try { |
| 153 | 153 | $this->shareWrapperService->deleteUserSharesToCircle($singleId, $member->getUserId()); |
| 154 | 154 | } catch (\Exception $e) { |
| 155 | - $this->logger->notice('issue while deleting user shares: ' . $e->getMessage()); |
|
| 155 | + $this->logger->notice('issue while deleting user shares: '.$e->getMessage()); |
|
| 156 | 156 | } |
| 157 | 157 | } |
| 158 | 158 | } |
@@ -105,7 +105,7 @@ |
||
| 105 | 105 | $qb->exprLimitInt('status', EventWrapper::STATUS_FAILED), |
| 106 | 106 | $expr->andX( |
| 107 | 107 | $qb->exprLimitInt('status', EventWrapper::STATUS_INIT), |
| 108 | - $qb->exprGt('creation', time() - 86400), // only freshly created; less than 3 hours |
|
| 108 | + $qb->exprGt('creation', time() - 86400), // only freshly created; less than 3 hours |
|
| 109 | 109 | $qb->exprLt('creation', time() - 900) // but not too fresh, at least 15 minutes |
| 110 | 110 | ) |
| 111 | 111 | ) |
@@ -244,7 +244,7 @@ discard block |
||
| 244 | 244 | return $value; |
| 245 | 245 | } |
| 246 | 246 | |
| 247 | - if (($value = $this->config->getSystemValue(Application::APP_ID . '.' . $key, '')) !== '') { |
|
| 247 | + if (($value = $this->config->getSystemValue(Application::APP_ID.'.'.$key, '')) !== '') { |
|
| 248 | 248 | return $value; |
| 249 | 249 | } |
| 250 | 250 | |
@@ -498,7 +498,7 @@ discard block |
||
| 498 | 498 | */ |
| 499 | 499 | public function getTrustedDomains(): array { |
| 500 | 500 | return array_map( |
| 501 | - function (string $address) { |
|
| 501 | + function(string $address) { |
|
| 502 | 502 | return strtolower($address); |
| 503 | 503 | }, $this->config->getSystemValue('trusted_domains', []) |
| 504 | 504 | ); |
@@ -534,7 +534,7 @@ discard block |
||
| 534 | 534 | } |
| 535 | 535 | |
| 536 | 536 | if (array_key_exists('port', $loopback)) { |
| 537 | - $loopbackCloudId = $loopback['host'] . ':' . $loopback['port']; |
|
| 537 | + $loopbackCloudId = $loopback['host'].':'.$loopback['port']; |
|
| 538 | 538 | } else { |
| 539 | 539 | $loopbackCloudId = $loopback['host']; |
| 540 | 540 | } |
@@ -573,13 +573,13 @@ discard block |
||
| 573 | 573 | $path = $this->getAppValue(self::LOOPBACK_CLOUD_PATH); |
| 574 | 574 | } |
| 575 | 575 | |
| 576 | - $base = $scheme . '://' . $instance . $path; |
|
| 576 | + $base = $scheme.'://'.$instance.$path; |
|
| 577 | 577 | |
| 578 | 578 | if ($route === '') { |
| 579 | 579 | return $base; |
| 580 | 580 | } |
| 581 | 581 | |
| 582 | - return rtrim($base, '/') . $this->linkToRoute($route, $args); |
|
| 582 | + return rtrim($base, '/').$this->linkToRoute($route, $args); |
|
| 583 | 583 | } |
| 584 | 584 | |
| 585 | 585 | |
@@ -684,7 +684,7 @@ discard block |
||
| 684 | 684 | ): string { |
| 685 | 685 | $name = ($displayName) ? $federatedUser->getDisplayName() : $federatedUser->getUserId(); |
| 686 | 686 | if ($federatedUser->getUserType() === Member::TYPE_MAIL) { |
| 687 | - return $name . ' ' . $this->displayInstance( |
|
| 687 | + return $name.' '.$this->displayInstance( |
|
| 688 | 688 | $federatedUser->getInstance(), |
| 689 | 689 | self::DISPLAY_PARENTHESIS |
| 690 | 690 | ); |
@@ -694,7 +694,7 @@ discard block |
||
| 694 | 694 | return $name; |
| 695 | 695 | } |
| 696 | 696 | |
| 697 | - return $name . $this->displayInstance($federatedUser->getInstance(), self::DISPLAY_AT); |
|
| 697 | + return $name.$this->displayInstance($federatedUser->getInstance(), self::DISPLAY_AT); |
|
| 698 | 698 | } |
| 699 | 699 | |
| 700 | 700 | /** |
@@ -710,9 +710,9 @@ discard block |
||
| 710 | 710 | |
| 711 | 711 | switch ($type) { |
| 712 | 712 | case self::DISPLAY_AT: |
| 713 | - return '@' . $instance; |
|
| 713 | + return '@'.$instance; |
|
| 714 | 714 | case self::DISPLAY_PARENTHESIS: |
| 715 | - return '(' . $instance . ')'; |
|
| 715 | + return '('.$instance.')'; |
|
| 716 | 716 | } |
| 717 | 717 | |
| 718 | 718 | return $instance; |
@@ -764,7 +764,7 @@ discard block |
||
| 764 | 764 | // when running from the occ command, /index.php is not removed by itself |
| 765 | 765 | if (str_starts_with($path, '/index.php/') |
| 766 | 766 | && $this->config->getSystemValueString('htaccess.RewriteBase', '') !== '') { |
| 767 | - $path = $this->config->getSystemValueString('htaccess.RewriteBase', '/') . substr($path, 11); |
|
| 767 | + $path = $this->config->getSystemValueString('htaccess.RewriteBase', '/').substr($path, 11); |
|
| 768 | 768 | } |
| 769 | 769 | |
| 770 | 770 | $knownPath = parse_url($this->config->getSystemValue('overwrite.cli.url'), PHP_URL_PATH); |
@@ -252,7 +252,7 @@ |
||
| 252 | 252 | try { |
| 253 | 253 | $circleService->getCircle($uniqueId); // checking current user have access to said circle |
| 254 | 254 | $files = array_map( |
| 255 | - function (ShareWrapper $wrapper): int { |
|
| 255 | + function(ShareWrapper $wrapper): int { |
|
| 256 | 256 | return $wrapper->getFileSource(); |
| 257 | 257 | }, $shareWrapperService->getSharesToCircle($uniqueId) |
| 258 | 258 | ); |
@@ -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 | } |
@@ -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 | } |
@@ -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()); |
@@ -68,7 +68,7 @@ |
||
| 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 | |