@@ -79,7 +79,7 @@ discard block |
||
| 79 | 79 | if ($path === '') { |
| 80 | 80 | return $this->getRoot(); |
| 81 | 81 | } else { |
| 82 | - return $this->getRoot() . '/' . ltrim($path, '/'); |
|
| 82 | + return $this->getRoot().'/'.ltrim($path, '/'); |
|
| 83 | 83 | } |
| 84 | 84 | } |
| 85 | 85 | |
@@ -98,7 +98,7 @@ discard block |
||
| 98 | 98 | $rootLength = strlen($root) + 1; |
| 99 | 99 | if ($path === $root) { |
| 100 | 100 | return ''; |
| 101 | - } elseif (substr($path, 0, $rootLength) === $root . '/') { |
|
| 101 | + } elseif (substr($path, 0, $rootLength) === $root.'/') { |
|
| 102 | 102 | return substr($path, $rootLength); |
| 103 | 103 | } else { |
| 104 | 104 | return null; |
@@ -317,7 +317,7 @@ discard block |
||
| 317 | 317 | new SearchBinaryOperator(ISearchBinaryOperator::OPERATOR_OR, |
| 318 | 318 | [ |
| 319 | 319 | new SearchComparison(ISearchComparison::COMPARE_EQUAL, 'path', $this->getGetUnjailedRoot()), |
| 320 | - new SearchComparison(ISearchComparison::COMPARE_LIKE_CASE_SENSITIVE, 'path', SearchComparison::escapeLikeParameter($this->getGetUnjailedRoot()) . '/%'), |
|
| 320 | + new SearchComparison(ISearchComparison::COMPARE_LIKE_CASE_SENSITIVE, 'path', SearchComparison::escapeLikeParameter($this->getGetUnjailedRoot()).'/%'), |
|
| 321 | 321 | ], |
| 322 | 322 | ) |
| 323 | 323 | ] |
@@ -26,7 +26,7 @@ |
||
| 26 | 26 | </div> |
| 27 | 27 | </fieldset> |
| 28 | 28 | <fieldset> |
| 29 | - <input type="submit" value="<?php p($l->t('Save'));?>"> |
|
| 29 | + <input type="submit" value="<?php p($l->t('Save')); ?>"> |
|
| 30 | 30 | </fieldset> |
| 31 | 31 | </form> |
| 32 | 32 | </div> |
@@ -188,7 +188,7 @@ discard block |
||
| 188 | 188 | |
| 189 | 189 | private function filterTrace(array $trace) { |
| 190 | 190 | $sensitiveValues = []; |
| 191 | - $trace = array_map(function (array $traceLine) use (&$sensitiveValues) { |
|
| 191 | + $trace = array_map(function(array $traceLine) use (&$sensitiveValues) { |
|
| 192 | 192 | $className = $traceLine['class'] ?? ''; |
| 193 | 193 | if ($className && isset($this->methodsWithSensitiveParametersByClass[$className]) |
| 194 | 194 | && in_array($traceLine['function'], $this->methodsWithSensitiveParametersByClass[$className], true)) { |
@@ -201,7 +201,7 @@ discard block |
||
| 201 | 201 | } |
| 202 | 202 | return $traceLine; |
| 203 | 203 | }, $trace); |
| 204 | - return array_map(function (array $traceLine) use ($sensitiveValues) { |
|
| 204 | + return array_map(function(array $traceLine) use ($sensitiveValues) { |
|
| 205 | 205 | if (isset($traceLine['args'])) { |
| 206 | 206 | $traceLine['args'] = $this->removeValuesFromArgs($traceLine['args'], $sensitiveValues); |
| 207 | 207 | } |
@@ -223,7 +223,7 @@ discard block |
||
| 223 | 223 | } |
| 224 | 224 | |
| 225 | 225 | private function encodeTrace($trace) { |
| 226 | - $trace = array_map(function (array $line) { |
|
| 226 | + $trace = array_map(function(array $line) { |
|
| 227 | 227 | if (isset($line['args'])) { |
| 228 | 228 | $line['args'] = array_map([$this, 'encodeArg'], $line['args']); |
| 229 | 229 | } |
@@ -241,9 +241,9 @@ discard block |
||
| 241 | 241 | ]; |
| 242 | 242 | } |
| 243 | 243 | |
| 244 | - $objectInfo = [ '__class__' => get_class($arg) ]; |
|
| 244 | + $objectInfo = ['__class__' => get_class($arg)]; |
|
| 245 | 245 | $objectVars = get_object_vars($arg); |
| 246 | - return array_map(function ($arg) use ($nestingLevel) { |
|
| 246 | + return array_map(function($arg) use ($nestingLevel) { |
|
| 247 | 247 | return $this->encodeArg($arg, $nestingLevel - 1); |
| 248 | 248 | }, array_merge($objectInfo, $objectVars)); |
| 249 | 249 | } |
@@ -254,14 +254,14 @@ discard block |
||
| 254 | 254 | } |
| 255 | 255 | |
| 256 | 256 | // Only log the first 5 elements of an array unless we are on debug |
| 257 | - if ((int)$this->systemConfig->getValue('loglevel', 2) !== 0) { |
|
| 257 | + if ((int) $this->systemConfig->getValue('loglevel', 2) !== 0) { |
|
| 258 | 258 | $elemCount = count($arg); |
| 259 | 259 | if ($elemCount > 5) { |
| 260 | 260 | $arg = array_slice($arg, 0, 5); |
| 261 | - $arg[] = 'And ' . ($elemCount - 5) . ' more entries, set log level to debug to see all entries'; |
|
| 261 | + $arg[] = 'And '.($elemCount - 5).' more entries, set log level to debug to see all entries'; |
|
| 262 | 262 | } |
| 263 | 263 | } |
| 264 | - return array_map(function ($e) use ($nestingLevel) { |
|
| 264 | + return array_map(function($e) use ($nestingLevel) { |
|
| 265 | 265 | return $this->encodeArg($e, $nestingLevel - 1); |
| 266 | 266 | }, $arg); |
| 267 | 267 | } |
@@ -167,7 +167,7 @@ |
||
| 167 | 167 | * @return bool |
| 168 | 168 | */ |
| 169 | 169 | public function isFlagSet(int $flag): bool { |
| 170 | - return (bool)($this->flags & $flag); |
|
| 170 | + return (bool) ($this->flags & $flag); |
|
| 171 | 171 | } |
| 172 | 172 | |
| 173 | 173 | /** |
@@ -117,7 +117,7 @@ discard block |
||
| 117 | 117 | $uid = $input->getArgument('uid'); |
| 118 | 118 | $user = $this->userManager->get($uid); |
| 119 | 119 | if (!$user) { |
| 120 | - throw new \InvalidArgumentException('The user "' . $uid . '" does not exist.'); |
|
| 120 | + throw new \InvalidArgumentException('The user "'.$uid.'" does not exist.'); |
|
| 121 | 121 | } |
| 122 | 122 | // normalize uid |
| 123 | 123 | $input->setArgument('uid', $user->getUID()); |
@@ -155,7 +155,7 @@ discard block |
||
| 155 | 155 | try { |
| 156 | 156 | $this->checkInput($input); |
| 157 | 157 | } catch (\InvalidArgumentException $e) { |
| 158 | - $output->writeln('<error>' . $e->getMessage() . '</error>'); |
|
| 158 | + $output->writeln('<error>'.$e->getMessage().'</error>'); |
|
| 159 | 159 | return 1; |
| 160 | 160 | } |
| 161 | 161 | |
@@ -167,7 +167,7 @@ discard block |
||
| 167 | 167 | $value = $this->config->getUserValue($uid, $app, $key, null); |
| 168 | 168 | if ($input->getArgument('value') !== null) { |
| 169 | 169 | if ($input->hasParameterOption('--update-only') && $value === null) { |
| 170 | - $output->writeln('<error>The setting does not exist for user "' . $uid . '".</error>'); |
|
| 170 | + $output->writeln('<error>The setting does not exist for user "'.$uid.'".</error>'); |
|
| 171 | 171 | return 1; |
| 172 | 172 | } |
| 173 | 173 | |
@@ -197,7 +197,7 @@ discard block |
||
| 197 | 197 | return 0; |
| 198 | 198 | } elseif ($input->hasParameterOption('--delete')) { |
| 199 | 199 | if ($input->hasParameterOption('--error-if-not-exists') && $value === null) { |
| 200 | - $output->writeln('<error>The setting does not exist for user "' . $uid . '".</error>'); |
|
| 200 | + $output->writeln('<error>The setting does not exist for user "'.$uid.'".</error>'); |
|
| 201 | 201 | return 1; |
| 202 | 202 | } |
| 203 | 203 | |
@@ -229,7 +229,7 @@ discard block |
||
| 229 | 229 | $output->writeln($user->getDisplayName()); |
| 230 | 230 | return 0; |
| 231 | 231 | } |
| 232 | - $output->writeln('<error>The setting does not exist for user "' . $uid . '".</error>'); |
|
| 232 | + $output->writeln('<error>The setting does not exist for user "'.$uid.'".</error>'); |
|
| 233 | 233 | return 1; |
| 234 | 234 | } |
| 235 | 235 | } else { |
@@ -69,8 +69,8 @@ |
||
| 69 | 69 | 'status' => $this->getOCSStatus() === 100 ? 'ok' : 'failure', |
| 70 | 70 | 'statuscode' => $this->getOCSStatus(), |
| 71 | 71 | 'message' => $this->getOCSStatus() === 100 ? 'OK' : $this->statusMessage ?? '', |
| 72 | - 'totalitems' => (string)($this->itemsCount ?? ''), |
|
| 73 | - 'itemsperpage' => (string)($this->itemsPerPage ?? ''), |
|
| 72 | + 'totalitems' => (string) ($this->itemsCount ?? ''), |
|
| 73 | + 'itemsperpage' => (string) ($this->itemsPerPage ?? ''), |
|
| 74 | 74 | ]; |
| 75 | 75 | |
| 76 | 76 | return $this->renderResult($meta); |
@@ -137,7 +137,7 @@ discard block |
||
| 137 | 137 | $this->logger = $logger; |
| 138 | 138 | } |
| 139 | 139 | |
| 140 | - public function for(string $appId): IRegistrationContext { |
|
| 140 | + public function for (string $appId): IRegistrationContext { |
|
| 141 | 141 | return new class($appId, $this) implements IRegistrationContext { |
| 142 | 142 | /** @var string */ |
| 143 | 143 | private $appId; |
@@ -479,7 +479,7 @@ discard block |
||
| 479 | 479 | ->getContainer() |
| 480 | 480 | ->registerCapability($registration->getService()); |
| 481 | 481 | } catch (Throwable $e) { |
| 482 | - $this->logger->error("Error during capability registration of $appId: " . $e->getMessage(), [ |
|
| 482 | + $this->logger->error("Error during capability registration of $appId: ".$e->getMessage(), [ |
|
| 483 | 483 | 'exception' => $e, |
| 484 | 484 | ]); |
| 485 | 485 | } |
@@ -495,7 +495,7 @@ discard block |
||
| 495 | 495 | $registry->registerLazy($registration->getService()); |
| 496 | 496 | } catch (Throwable $e) { |
| 497 | 497 | $appId = $registration->getAppId(); |
| 498 | - $this->logger->error("Error during crash reporter registration of $appId: " . $e->getMessage(), [ |
|
| 498 | + $this->logger->error("Error during crash reporter registration of $appId: ".$e->getMessage(), [ |
|
| 499 | 499 | 'exception' => $e, |
| 500 | 500 | ]); |
| 501 | 501 | } |
@@ -511,7 +511,7 @@ discard block |
||
| 511 | 511 | $dashboardManager->lazyRegisterWidget($panel->getService(), $panel->getAppId()); |
| 512 | 512 | } catch (Throwable $e) { |
| 513 | 513 | $appId = $panel->getAppId(); |
| 514 | - $this->logger->error("Error during dashboard registration of $appId: " . $e->getMessage(), [ |
|
| 514 | + $this->logger->error("Error during dashboard registration of $appId: ".$e->getMessage(), [ |
|
| 515 | 515 | 'exception' => $e, |
| 516 | 516 | ]); |
| 517 | 517 | } |
@@ -528,7 +528,7 @@ discard block |
||
| 528 | 528 | ); |
| 529 | 529 | } catch (Throwable $e) { |
| 530 | 530 | $appId = $registration->getAppId(); |
| 531 | - $this->logger->error("Error during event listener registration of $appId: " . $e->getMessage(), [ |
|
| 531 | + $this->logger->error("Error during event listener registration of $appId: ".$e->getMessage(), [ |
|
| 532 | 532 | 'exception' => $e, |
| 533 | 533 | ]); |
| 534 | 534 | } |
@@ -561,7 +561,7 @@ discard block |
||
| 561 | 561 | $registration->isShared() |
| 562 | 562 | ); |
| 563 | 563 | } catch (Throwable $e) { |
| 564 | - $this->logger->error("Error during service registration of $appId: " . $e->getMessage(), [ |
|
| 564 | + $this->logger->error("Error during service registration of $appId: ".$e->getMessage(), [ |
|
| 565 | 565 | 'exception' => $e, |
| 566 | 566 | ]); |
| 567 | 567 | } |
@@ -585,7 +585,7 @@ discard block |
||
| 585 | 585 | $registration->getTarget() |
| 586 | 586 | ); |
| 587 | 587 | } catch (Throwable $e) { |
| 588 | - $this->logger->error("Error during service alias registration of $appId: " . $e->getMessage(), [ |
|
| 588 | + $this->logger->error("Error during service alias registration of $appId: ".$e->getMessage(), [ |
|
| 589 | 589 | 'exception' => $e, |
| 590 | 590 | ]); |
| 591 | 591 | } |
@@ -609,7 +609,7 @@ discard block |
||
| 609 | 609 | $registration->getValue() |
| 610 | 610 | ); |
| 611 | 611 | } catch (Throwable $e) { |
| 612 | - $this->logger->error("Error during service parameter registration of $appId: " . $e->getMessage(), [ |
|
| 612 | + $this->logger->error("Error during service parameter registration of $appId: ".$e->getMessage(), [ |
|
| 613 | 613 | 'exception' => $e, |
| 614 | 614 | ]); |
| 615 | 615 | } |
@@ -55,7 +55,7 @@ |
||
| 55 | 55 | } |
| 56 | 56 | |
| 57 | 57 | $providers = $this->manager->getDiscoverableProviders(); |
| 58 | - $jsonProviders = array_map(static function (IDiscoverableReferenceProvider $provider) { |
|
| 58 | + $jsonProviders = array_map(static function(IDiscoverableReferenceProvider $provider) { |
|
| 59 | 59 | return $provider->jsonSerialize(); |
| 60 | 60 | }, $providers); |
| 61 | 61 | $this->initialStateService->provideInitialState('core', 'reference-provider-list', $jsonProviders); |
@@ -64,7 +64,7 @@ |
||
| 64 | 64 | */ |
| 65 | 65 | public function getForm(): TemplateResponse { |
| 66 | 66 | $cloudID = $this->userSession->getUser()->getCloudId(); |
| 67 | - $url = 'https://nextcloud.com/sharing#' . $cloudID; |
|
| 67 | + $url = 'https://nextcloud.com/sharing#'.$cloudID; |
|
| 68 | 68 | |
| 69 | 69 | $this->initialState->provideInitialState('color', $this->defaults->getDefaultColorPrimary()); |
| 70 | 70 | $this->initialState->provideInitialState('textColor', $this->defaults->getDefaultTextColorPrimary()); |