@@ -63,7 +63,7 @@ |
||
63 | 63 | $managerProvider = $this->managerProvider; |
64 | 64 | $manager = $managerProvider(); |
65 | 65 | $data['manager'] = $manager; |
66 | - $mountPoint = '/' . $user->getUID() . '/files/' . ltrim($data['mountpoint'], '/'); |
|
66 | + $mountPoint = '/'.$user->getUID().'/files/'.ltrim($data['mountpoint'], '/'); |
|
67 | 67 | $data['mountpoint'] = $mountPoint; |
68 | 68 | $data['cloudId'] = $this->cloudIdManager->getCloudId($data['owner'], $data['remote']); |
69 | 69 | $data['certificateManager'] = \OC::$server->getCertificateManager(); |
@@ -95,7 +95,7 @@ discard block |
||
95 | 95 | $postfix = $route['postfix'] ?? ''; |
96 | 96 | $root = $this->buildRootPrefix($route, $appName, $routeNamePrefix); |
97 | 97 | |
98 | - $url = $root . '/' . ltrim($route['url'], '/'); |
|
98 | + $url = $root.'/'.ltrim($route['url'], '/'); |
|
99 | 99 | $verb = strtoupper($route['verb'] ?? 'GET'); |
100 | 100 | |
101 | 101 | $split = explode('#', $name, 2); |
@@ -107,7 +107,7 @@ discard block |
||
107 | 107 | $controllerName = $this->buildControllerName($controller); |
108 | 108 | $actionName = $this->buildActionName($action); |
109 | 109 | |
110 | - $routeName = $routeNamePrefix . $appName . '.' . $controller . '.' . $action . $postfix; |
|
110 | + $routeName = $routeNamePrefix.$appName.'.'.$controller.'.'.$action.$postfix; |
|
111 | 111 | |
112 | 112 | $routeObject = new Route($url); |
113 | 113 | $routeObject->method($verb); |
@@ -186,7 +186,7 @@ discard block |
||
186 | 186 | |
187 | 187 | // the url parameter used as id to the resource |
188 | 188 | foreach ($actions as $action) { |
189 | - $url = $root . '/' . ltrim($config['url'], '/'); |
|
189 | + $url = $root.'/'.ltrim($config['url'], '/'); |
|
190 | 190 | $method = $action['name']; |
191 | 191 | |
192 | 192 | $verb = strtoupper($action['verb'] ?? 'GET'); |
@@ -200,7 +200,7 @@ discard block |
||
200 | 200 | $controllerName = $this->buildControllerName($controller); |
201 | 201 | $actionName = $this->buildActionName($method); |
202 | 202 | |
203 | - $routeName = $routeNamePrefix . $appName . '.' . strtolower($resource) . '.' . $method; |
|
203 | + $routeName = $routeNamePrefix.$appName.'.'.strtolower($resource).'.'.$method; |
|
204 | 204 | |
205 | 205 | $route = new Route($url); |
206 | 206 | $route->method($verb); |
@@ -215,7 +215,7 @@ discard block |
||
215 | 215 | } |
216 | 216 | |
217 | 217 | private function buildRootPrefix(array $route, string $appName, string $routeNamePrefix): string { |
218 | - $defaultRoot = $appName === 'core' ? '' : '/apps/' . $appName; |
|
218 | + $defaultRoot = $appName === 'core' ? '' : '/apps/'.$appName; |
|
219 | 219 | $root = $route['root'] ?? $defaultRoot; |
220 | 220 | |
221 | 221 | if ($routeNamePrefix !== '') { |
@@ -238,7 +238,7 @@ discard block |
||
238 | 238 | */ |
239 | 239 | private function buildControllerName(string $controller): string { |
240 | 240 | if (!isset($this->controllerNameCache[$controller])) { |
241 | - $this->controllerNameCache[$controller] = $this->underScoreToCamelCase(ucfirst($controller)) . 'Controller'; |
|
241 | + $this->controllerNameCache[$controller] = $this->underScoreToCamelCase(ucfirst($controller)).'Controller'; |
|
242 | 242 | } |
243 | 243 | return $this->controllerNameCache[$controller]; |
244 | 244 | } |
@@ -261,7 +261,7 @@ discard block |
||
261 | 261 | $pattern = '/_[a-z]?/'; |
262 | 262 | return preg_replace_callback( |
263 | 263 | $pattern, |
264 | - function ($matches) { |
|
264 | + function($matches) { |
|
265 | 265 | return strtoupper(ltrim($matches[0], '_')); |
266 | 266 | }, |
267 | 267 | $str); |
@@ -94,7 +94,7 @@ |
||
94 | 94 | * @param bool $httpOnly |
95 | 95 | */ |
96 | 96 | public function setCookie($name, $value, $expire, $path, $domain, $secure, $httpOnly, $sameSite = 'Lax') { |
97 | - $path = $this->webRoot ? : '/'; |
|
97 | + $path = $this->webRoot ?: '/'; |
|
98 | 98 | |
99 | 99 | setcookie($name, $value, [ |
100 | 100 | 'expires' => $expire, |
@@ -31,7 +31,7 @@ |
||
31 | 31 | \OC_JSON::checkAppEnabled('user_ldap'); |
32 | 32 | \OC_JSON::callCheck(); |
33 | 33 | |
34 | -$prefix = (string)$_POST['ldap_serverconfig_chooser']; |
|
34 | +$prefix = (string) $_POST['ldap_serverconfig_chooser']; |
|
35 | 35 | $helper = new \OCA\User_LDAP\Helper(\OC::$server->getConfig(), \OC::$server->getDatabaseConnection()); |
36 | 36 | if ($helper->deleteServerConfiguration($prefix)) { |
37 | 37 | \OC_JSON::success(); |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | |
63 | 63 | $container = $this->getContainer(); |
64 | 64 | |
65 | - $container->registerService('defaultMailAddress', function () { |
|
65 | + $container->registerService('defaultMailAddress', function() { |
|
66 | 66 | return Util::getDefaultEmailAddress('lostpassword-noreply'); |
67 | 67 | }); |
68 | 68 | |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | $oldEventDispatcher = $server->getEventDispatcher(); |
78 | 78 | |
79 | 79 | $oldEventDispatcher->addListener(IDBConnection::CHECK_MISSING_INDEXES_EVENT, |
80 | - function (GenericEvent $event) use ($container) { |
|
80 | + function(GenericEvent $event) use ($container) { |
|
81 | 81 | /** @var MissingIndexInformation $subject */ |
82 | 82 | $subject = $event->getSubject(); |
83 | 83 | |
@@ -183,7 +183,7 @@ discard block |
||
183 | 183 | ); |
184 | 184 | |
185 | 185 | $oldEventDispatcher->addListener(IDBConnection::CHECK_MISSING_PRIMARY_KEYS_EVENT, |
186 | - function (GenericEvent $event) use ($container) { |
|
186 | + function(GenericEvent $event) use ($container) { |
|
187 | 187 | /** @var MissingPrimaryKeyInformation $subject */ |
188 | 188 | $subject = $event->getSubject(); |
189 | 189 | |
@@ -240,7 +240,7 @@ discard block |
||
240 | 240 | ); |
241 | 241 | |
242 | 242 | $oldEventDispatcher->addListener(IDBConnection::CHECK_MISSING_COLUMNS_EVENT, |
243 | - function (GenericEvent $event) use ($container) { |
|
243 | + function(GenericEvent $event) use ($container) { |
|
244 | 244 | /** @var MissingColumnInformation $subject */ |
245 | 245 | $subject = $event->getSubject(); |
246 | 246 |
@@ -83,8 +83,7 @@ |
||
83 | 83 | 'color-element-dark' => $this->util->elementColor($color, false), |
84 | 84 | 'logo' => $this->url->getAbsoluteURL($this->theming->getLogo()), |
85 | 85 | 'background' => $backgroundLogo === 'backgroundColor' || ($backgroundLogo === '' && $this->theming->getColorPrimary() !== '#0082c9') ? |
86 | - $this->theming->getColorPrimary() : |
|
87 | - $this->url->getAbsoluteURL($this->theming->getBackground()), |
|
86 | + $this->theming->getColorPrimary() : $this->url->getAbsoluteURL($this->theming->getBackground()), |
|
88 | 87 | 'background-plain' => $backgroundLogo === 'backgroundColor' || ($backgroundLogo === '' && $this->theming->getColorPrimary() !== '#0082c9'), |
89 | 88 | 'background-default' => !$this->util->isBackgroundThemed(), |
90 | 89 | 'logoheader' => $this->url->getAbsoluteURL($this->theming->getLogo()), |
@@ -471,27 +471,27 @@ discard block |
||
471 | 471 | } |
472 | 472 | |
473 | 473 | if (!empty($this->allowedImageDomains)) { |
474 | - $policy .= 'img-src ' . implode(' ', $this->allowedImageDomains); |
|
474 | + $policy .= 'img-src '.implode(' ', $this->allowedImageDomains); |
|
475 | 475 | $policy .= ';'; |
476 | 476 | } |
477 | 477 | |
478 | 478 | if (!empty($this->allowedFontDomains)) { |
479 | - $policy .= 'font-src ' . implode(' ', $this->allowedFontDomains); |
|
479 | + $policy .= 'font-src '.implode(' ', $this->allowedFontDomains); |
|
480 | 480 | $policy .= ';'; |
481 | 481 | } |
482 | 482 | |
483 | 483 | if (!empty($this->allowedConnectDomains)) { |
484 | - $policy .= 'connect-src ' . implode(' ', $this->allowedConnectDomains); |
|
484 | + $policy .= 'connect-src '.implode(' ', $this->allowedConnectDomains); |
|
485 | 485 | $policy .= ';'; |
486 | 486 | } |
487 | 487 | |
488 | 488 | if (!empty($this->allowedMediaDomains)) { |
489 | - $policy .= 'media-src ' . implode(' ', $this->allowedMediaDomains); |
|
489 | + $policy .= 'media-src '.implode(' ', $this->allowedMediaDomains); |
|
490 | 490 | $policy .= ';'; |
491 | 491 | } |
492 | 492 | |
493 | 493 | if (!empty($this->allowedObjectDomains)) { |
494 | - $policy .= 'object-src ' . implode(' ', $this->allowedObjectDomains); |
|
494 | + $policy .= 'object-src '.implode(' ', $this->allowedObjectDomains); |
|
495 | 495 | $policy .= ';'; |
496 | 496 | } |
497 | 497 | |
@@ -502,29 +502,29 @@ discard block |
||
502 | 502 | } |
503 | 503 | |
504 | 504 | if (!empty($this->allowedChildSrcDomains)) { |
505 | - $policy .= 'child-src ' . implode(' ', $this->allowedChildSrcDomains); |
|
505 | + $policy .= 'child-src '.implode(' ', $this->allowedChildSrcDomains); |
|
506 | 506 | $policy .= ';'; |
507 | 507 | } |
508 | 508 | |
509 | 509 | if (!empty($this->allowedFrameAncestors)) { |
510 | - $policy .= 'frame-ancestors ' . implode(' ', $this->allowedFrameAncestors); |
|
510 | + $policy .= 'frame-ancestors '.implode(' ', $this->allowedFrameAncestors); |
|
511 | 511 | $policy .= ';'; |
512 | 512 | } else { |
513 | 513 | $policy .= 'frame-ancestors \'none\';'; |
514 | 514 | } |
515 | 515 | |
516 | 516 | if (!empty($this->allowedWorkerSrcDomains)) { |
517 | - $policy .= 'worker-src ' . implode(' ', $this->allowedWorkerSrcDomains); |
|
517 | + $policy .= 'worker-src '.implode(' ', $this->allowedWorkerSrcDomains); |
|
518 | 518 | $policy .= ';'; |
519 | 519 | } |
520 | 520 | |
521 | 521 | if (!empty($this->allowedFormActionDomains)) { |
522 | - $policy .= 'form-action ' . implode(' ', $this->allowedFormActionDomains); |
|
522 | + $policy .= 'form-action '.implode(' ', $this->allowedFormActionDomains); |
|
523 | 523 | $policy .= ';'; |
524 | 524 | } |
525 | 525 | |
526 | 526 | if (!empty($this->reportTo)) { |
527 | - $policy .= 'report-uri ' . implode(' ', $this->reportTo); |
|
527 | + $policy .= 'report-uri '.implode(' ', $this->reportTo); |
|
528 | 528 | $policy .= ';'; |
529 | 529 | } |
530 | 530 |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | */ |
66 | 66 | public function getTableNamesWithoutPrefix() { |
67 | 67 | $tableNames = $this->schema->getTableNames(); |
68 | - return array_map(function ($tableName) { |
|
68 | + return array_map(function($tableName) { |
|
69 | 69 | if (strpos($tableName, $this->connection->getPrefix()) === 0) { |
70 | 70 | return substr($tableName, strlen($this->connection->getPrefix())); |
71 | 71 | } |
@@ -90,7 +90,7 @@ discard block |
||
90 | 90 | * @throws \Doctrine\DBAL\Schema\SchemaException |
91 | 91 | */ |
92 | 92 | public function getTable($tableName) { |
93 | - return $this->schema->getTable($this->connection->getPrefix() . $tableName); |
|
93 | + return $this->schema->getTable($this->connection->getPrefix().$tableName); |
|
94 | 94 | } |
95 | 95 | |
96 | 96 | /** |
@@ -101,7 +101,7 @@ discard block |
||
101 | 101 | * @return boolean |
102 | 102 | */ |
103 | 103 | public function hasTable($tableName) { |
104 | - return $this->schema->hasTable($this->connection->getPrefix() . $tableName); |
|
104 | + return $this->schema->hasTable($this->connection->getPrefix().$tableName); |
|
105 | 105 | } |
106 | 106 | |
107 | 107 | /** |
@@ -112,7 +112,7 @@ discard block |
||
112 | 112 | */ |
113 | 113 | public function createTable($tableName) { |
114 | 114 | unset($this->tablesToDelete[$tableName]); |
115 | - return $this->schema->createTable($this->connection->getPrefix() . $tableName); |
|
115 | + return $this->schema->createTable($this->connection->getPrefix().$tableName); |
|
116 | 116 | } |
117 | 117 | |
118 | 118 | /** |
@@ -123,7 +123,7 @@ discard block |
||
123 | 123 | */ |
124 | 124 | public function dropTable($tableName) { |
125 | 125 | $this->tablesToDelete[$tableName] = true; |
126 | - return $this->schema->dropTable($this->connection->getPrefix() . $tableName); |
|
126 | + return $this->schema->dropTable($this->connection->getPrefix().$tableName); |
|
127 | 127 | } |
128 | 128 | |
129 | 129 | /** |
@@ -94,7 +94,7 @@ |
||
94 | 94 | $encryptionManager->registerEncryptionModule( |
95 | 95 | Encryption::ID, |
96 | 96 | Encryption::DISPLAY_NAME, |
97 | - function () use ($container) { |
|
97 | + function() use ($container) { |
|
98 | 98 | return new Encryption( |
99 | 99 | $container->query(Crypt::class), |
100 | 100 | $container->query(KeyManager::class), |