@@ -59,7 +59,7 @@ |
||
59 | 59 | */ |
60 | 60 | private function registerEventListeners(EventDispatcher $dispatcher, |
61 | 61 | IAppContainer $appContainer): void { |
62 | - $dispatcher->addListener('OC\AccountManager::userUpdated', function (GenericEvent $event) use ($appContainer) { |
|
62 | + $dispatcher->addListener('OC\AccountManager::userUpdated', function(GenericEvent $event) use ($appContainer) { |
|
63 | 63 | /** @var IUser $user */ |
64 | 64 | $user = $event->getSubject(); |
65 | 65 |
@@ -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); |
@@ -90,7 +90,7 @@ |
||
90 | 90 | * @return mixed the value or $default |
91 | 91 | */ |
92 | 92 | public function getValue($key, $default = null) { |
93 | - $envKey = self::ENV_PREFIX . $key; |
|
93 | + $envKey = self::ENV_PREFIX.$key; |
|
94 | 94 | if (isset($this->envCache[$envKey])) { |
95 | 95 | return $this->envCache[$envKey]; |
96 | 96 | } |
@@ -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()), |