@@ -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 |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | return $class->newInstance(); |
73 | 73 | } |
74 | 74 | |
75 | - return $class->newInstanceArgs(array_map(function (ReflectionParameter $parameter) { |
|
75 | + return $class->newInstanceArgs(array_map(function(ReflectionParameter $parameter) { |
|
76 | 76 | $parameterType = $parameter->getType(); |
77 | 77 | |
78 | 78 | $resolveName = $parameter->getName(); |
@@ -102,17 +102,17 @@ discard block |
||
102 | 102 | } |
103 | 103 | |
104 | 104 | public function resolve($name) { |
105 | - $baseMsg = 'Could not resolve ' . $name . '!'; |
|
105 | + $baseMsg = 'Could not resolve '.$name.'!'; |
|
106 | 106 | try { |
107 | 107 | $class = new ReflectionClass($name); |
108 | 108 | if ($class->isInstantiable()) { |
109 | 109 | return $this->buildClass($class); |
110 | 110 | } else { |
111 | - throw new QueryException($baseMsg . |
|
111 | + throw new QueryException($baseMsg. |
|
112 | 112 | ' Class can not be instantiated'); |
113 | 113 | } |
114 | 114 | } catch (ReflectionException $e) { |
115 | - throw new QueryException($baseMsg . ' ' . $e->getMessage()); |
|
115 | + throw new QueryException($baseMsg.' '.$e->getMessage()); |
|
116 | 116 | } |
117 | 117 | } |
118 | 118 | |
@@ -124,13 +124,13 @@ discard block |
||
124 | 124 | |
125 | 125 | if ($autoload) { |
126 | 126 | $object = $this->resolve($name); |
127 | - $this->registerService($name, function () use ($object) { |
|
127 | + $this->registerService($name, function() use ($object) { |
|
128 | 128 | return $object; |
129 | 129 | }); |
130 | 130 | return $object; |
131 | 131 | } |
132 | 132 | |
133 | - throw new QueryException('Could not resolve ' . $name . '!'); |
|
133 | + throw new QueryException('Could not resolve '.$name.'!'); |
|
134 | 134 | } |
135 | 135 | |
136 | 136 | /** |
@@ -151,7 +151,7 @@ discard block |
||
151 | 151 | * @param bool $shared |
152 | 152 | */ |
153 | 153 | public function registerService($name, Closure $closure, $shared = true) { |
154 | - $wrapped = function () use ($closure) { |
|
154 | + $wrapped = function() use ($closure) { |
|
155 | 155 | return $closure($this); |
156 | 156 | }; |
157 | 157 | $name = $this->sanitizeName($name); |
@@ -173,7 +173,7 @@ discard block |
||
173 | 173 | * @param string $target the target that should be resolved instead |
174 | 174 | */ |
175 | 175 | public function registerAlias($alias, $target) { |
176 | - $this->registerService($alias, function (ContainerInterface $container) use ($target) { |
|
176 | + $this->registerService($alias, function(ContainerInterface $container) use ($target) { |
|
177 | 177 | return $container->get($target); |
178 | 178 | }, false); |
179 | 179 | } |
@@ -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), |
@@ -66,7 +66,7 @@ |
||
66 | 66 | if ($this->displayName) { |
67 | 67 | $atPos = strrpos($this->getId(), '@'); |
68 | 68 | $atHost = substr($this->getId(), $atPos); |
69 | - return $this->displayName . $atHost; |
|
69 | + return $this->displayName.$atHost; |
|
70 | 70 | } |
71 | 71 | return str_replace('https://', '', str_replace('http://', '', $this->getId())); |
72 | 72 | } |