@@ -74,7 +74,7 @@ |
||
74 | 74 | } |
75 | 75 | |
76 | 76 | $query = $this->db->getQueryBuilder(); |
77 | - $query->select($query->createFunction('MAX(' . $query->getColumnName('id') . ')')) |
|
77 | + $query->select($query->createFunction('MAX('.$query->getColumnName('id').')')) |
|
78 | 78 | ->from('calendarobjects'); |
79 | 79 | $result = $query->execute(); |
80 | 80 | $maxId = (int) $result->fetchOne(); |
@@ -189,7 +189,7 @@ discard block |
||
189 | 189 | if (!is_array($supportedArchitectures)) { |
190 | 190 | $supportedArchitectures = [$supportedArchitectures]; |
191 | 191 | } |
192 | - $supportedArchitectures = array_map(function ($architecture) { |
|
192 | + $supportedArchitectures = array_map(function($architecture) { |
|
193 | 193 | return $this->getValue($architecture); |
194 | 194 | }, $supportedArchitectures); |
195 | 195 | $currentArchitecture = $this->platform->getArchitecture(); |
@@ -216,7 +216,7 @@ discard block |
||
216 | 216 | if (!is_array($supportedDatabases)) { |
217 | 217 | $supportedDatabases = [$supportedDatabases]; |
218 | 218 | } |
219 | - $supportedDatabases = array_map(function ($db) { |
|
219 | + $supportedDatabases = array_map(function($db) { |
|
220 | 220 | return $this->getValue($db); |
221 | 221 | }, $supportedDatabases); |
222 | 222 | $currentDatabase = $this->platform->getDatabase(); |
@@ -316,7 +316,7 @@ discard block |
||
316 | 316 | return $missing; |
317 | 317 | } |
318 | 318 | if (is_array($oss)) { |
319 | - $oss = array_map(function ($os) { |
|
319 | + $oss = array_map(function($os) { |
|
320 | 320 | return $this->getValue($os); |
321 | 321 | }, $oss); |
322 | 322 | } else { |
@@ -387,7 +387,7 @@ discard block |
||
387 | 387 | return '10'; |
388 | 388 | default: |
389 | 389 | if (strpos($version, '9.1.') === 0) { |
390 | - $version = '10.0.' . substr($version, 4); |
|
390 | + $version = '10.0.'.substr($version, 4); |
|
391 | 391 | } |
392 | 392 | return $version; |
393 | 393 | } |
@@ -401,6 +401,6 @@ discard block |
||
401 | 401 | if (isset($element['@value'])) { |
402 | 402 | return $element['@value']; |
403 | 403 | } |
404 | - return (string)$element; |
|
404 | + return (string) $element; |
|
405 | 405 | } |
406 | 406 | } |
@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | * OCS routes go into a different collection |
92 | 92 | */ |
93 | 93 | $oldCollection = $this->router->getCurrentCollection(); |
94 | - $this->router->useCollection($oldCollection . '.ocs'); |
|
94 | + $this->router->useCollection($oldCollection.'.ocs'); |
|
95 | 95 | |
96 | 96 | // parse ocs simple routes |
97 | 97 | $this->processOCS($this->routes); |
@@ -126,7 +126,7 @@ discard block |
||
126 | 126 | $postfix = $route['postfix'] ?? ''; |
127 | 127 | $root = $this->buildRootPrefix($route, $routeNamePrefix); |
128 | 128 | |
129 | - $url = $root . '/' . ltrim($route['url'], '/'); |
|
129 | + $url = $root.'/'.ltrim($route['url'], '/'); |
|
130 | 130 | $verb = strtoupper($route['verb'] ?? 'GET'); |
131 | 131 | |
132 | 132 | $split = explode('#', $name, 2); |
@@ -138,7 +138,7 @@ discard block |
||
138 | 138 | $controllerName = $this->buildControllerName($controller); |
139 | 139 | $actionName = $this->buildActionName($action); |
140 | 140 | |
141 | - $routeName = $routeNamePrefix . $this->appName . '.' . $controller . '.' . $action . $postfix; |
|
141 | + $routeName = $routeNamePrefix.$this->appName.'.'.$controller.'.'.$action.$postfix; |
|
142 | 142 | |
143 | 143 | $router = $this->router->create($routeName, $url) |
144 | 144 | ->method($verb); |
@@ -214,7 +214,7 @@ discard block |
||
214 | 214 | |
215 | 215 | // the url parameter used as id to the resource |
216 | 216 | foreach ($actions as $action) { |
217 | - $url = $root . '/' . ltrim($config['url'], '/'); |
|
217 | + $url = $root.'/'.ltrim($config['url'], '/'); |
|
218 | 218 | $method = $action['name']; |
219 | 219 | |
220 | 220 | $verb = strtoupper($action['verb'] ?? 'GET'); |
@@ -223,7 +223,7 @@ discard block |
||
223 | 223 | $url .= '/{id}'; |
224 | 224 | } |
225 | 225 | if (isset($action['url-postfix'])) { |
226 | - $url .= '/' . $action['url-postfix']; |
|
226 | + $url .= '/'.$action['url-postfix']; |
|
227 | 227 | } |
228 | 228 | |
229 | 229 | $controller = $resource; |
@@ -231,7 +231,7 @@ discard block |
||
231 | 231 | $controllerName = $this->buildControllerName($controller); |
232 | 232 | $actionName = $this->buildActionName($method); |
233 | 233 | |
234 | - $routeName = $routeNamePrefix . $this->appName . '.' . strtolower($resource) . '.' . $method; |
|
234 | + $routeName = $routeNamePrefix.$this->appName.'.'.strtolower($resource).'.'.$method; |
|
235 | 235 | |
236 | 236 | $route = $this->router->create($routeName, $url) |
237 | 237 | ->method($verb); |
@@ -242,7 +242,7 @@ discard block |
||
242 | 242 | } |
243 | 243 | |
244 | 244 | private function buildRootPrefix(array $route, string $routeNamePrefix): string { |
245 | - $defaultRoot = $this->appName === 'core' ? '' : '/apps/' . $this->appName; |
|
245 | + $defaultRoot = $this->appName === 'core' ? '' : '/apps/'.$this->appName; |
|
246 | 246 | $root = $route['root'] ?? $defaultRoot; |
247 | 247 | |
248 | 248 | if ($routeNamePrefix !== '') { |
@@ -265,7 +265,7 @@ discard block |
||
265 | 265 | */ |
266 | 266 | private function buildControllerName(string $controller): string { |
267 | 267 | if (!isset($this->controllerNameCache[$controller])) { |
268 | - $this->controllerNameCache[$controller] = $this->underScoreToCamelCase(ucfirst($controller)) . 'Controller'; |
|
268 | + $this->controllerNameCache[$controller] = $this->underScoreToCamelCase(ucfirst($controller)).'Controller'; |
|
269 | 269 | } |
270 | 270 | return $this->controllerNameCache[$controller]; |
271 | 271 | } |
@@ -288,7 +288,7 @@ discard block |
||
288 | 288 | $pattern = '/_[a-z]?/'; |
289 | 289 | return preg_replace_callback( |
290 | 290 | $pattern, |
291 | - function ($matches) { |
|
291 | + function($matches) { |
|
292 | 292 | return strtoupper(ltrim($matches[0], '_')); |
293 | 293 | }, |
294 | 294 | $str); |
@@ -104,7 +104,7 @@ |
||
104 | 104 | } |
105 | 105 | |
106 | 106 | public function registerPlugin(array $pluginInfo) { |
107 | - $shareType = constant(Share::class . '::' . $pluginInfo['shareType']); |
|
107 | + $shareType = constant(Share::class.'::'.$pluginInfo['shareType']); |
|
108 | 108 | if ($shareType === null) { |
109 | 109 | throw new \InvalidArgumentException('Provided ShareType is invalid'); |
110 | 110 | } |
@@ -134,7 +134,7 @@ discard block |
||
134 | 134 | $this->input = $input; |
135 | 135 | $this->output = $output; |
136 | 136 | |
137 | - $headline = 'Encrypt all files with the ' . Encryption::DISPLAY_NAME; |
|
137 | + $headline = 'Encrypt all files with the '.Encryption::DISPLAY_NAME; |
|
138 | 138 | $this->output->writeln("\n"); |
139 | 139 | $this->output->writeln($headline); |
140 | 140 | $this->output->writeln(str_pad('', strlen($headline), '=')); |
@@ -190,7 +190,7 @@ discard block |
||
190 | 190 | $users = $backend->getUsers('', $limit, $offset); |
191 | 191 | foreach ($users as $user) { |
192 | 192 | if ($this->keyManager->userHasKeys($user) === false) { |
193 | - $progress->setMessage('Create key-pair for ' . $user); |
|
193 | + $progress->setMessage('Create key-pair for '.$user); |
|
194 | 194 | $progress->advance(); |
195 | 195 | $this->setupUserFS($user); |
196 | 196 | $password = $this->generateOneTimePassword($user); |
@@ -264,12 +264,12 @@ discard block |
||
264 | 264 | protected function encryptUsersFiles($uid, ProgressBar $progress, $userCount) { |
265 | 265 | $this->setupUserFS($uid); |
266 | 266 | $directories = []; |
267 | - $directories[] = '/' . $uid . '/files'; |
|
267 | + $directories[] = '/'.$uid.'/files'; |
|
268 | 268 | |
269 | 269 | while ($root = array_pop($directories)) { |
270 | 270 | $content = $this->rootView->getDirectoryContent($root); |
271 | 271 | foreach ($content as $file) { |
272 | - $path = $root . '/' . $file['name']; |
|
272 | + $path = $root.'/'.$file['name']; |
|
273 | 273 | if ($this->rootView->is_dir($path)) { |
274 | 274 | $directories[] = $path; |
275 | 275 | continue; |
@@ -300,7 +300,7 @@ discard block |
||
300 | 300 | } |
301 | 301 | |
302 | 302 | $source = $path; |
303 | - $target = $path . '.encrypted.' . time(); |
|
303 | + $target = $path.'.encrypted.'.time(); |
|
304 | 304 | |
305 | 305 | try { |
306 | 306 | $this->rootView->copy($source, $target); |
@@ -88,7 +88,7 @@ |
||
88 | 88 | |
89 | 89 | public function lastInsertId(string $table): int { |
90 | 90 | try { |
91 | - return (int)$this->inner->lastInsertId($table); |
|
91 | + return (int) $this->inner->lastInsertId($table); |
|
92 | 92 | } catch (Exception $e) { |
93 | 93 | throw DbalException::wrap($e); |
94 | 94 | } |
@@ -123,14 +123,14 @@ discard block |
||
123 | 123 | |
124 | 124 | public function listCreators(): array { |
125 | 125 | $types = $this->getTypes(); |
126 | - usort($types, function (TemplateFileCreator $a, TemplateFileCreator $b) { |
|
126 | + usort($types, function(TemplateFileCreator $a, TemplateFileCreator $b) { |
|
127 | 127 | return $a->getOrder() - $b->getOrder(); |
128 | 128 | }); |
129 | 129 | return $types; |
130 | 130 | } |
131 | 131 | |
132 | 132 | public function listTemplates(): array { |
133 | - return array_map(function (TemplateFileCreator $entry) { |
|
133 | + return array_map(function(TemplateFileCreator $entry) { |
|
134 | 134 | return array_merge($entry->jsonSerialize(), [ |
135 | 135 | 'templates' => $this->getTemplateFiles($entry) |
136 | 136 | ]); |
@@ -156,7 +156,7 @@ discard block |
||
156 | 156 | $template = $userFolder->get($templateId); |
157 | 157 | $template->copy($targetFile->getPath()); |
158 | 158 | } else { |
159 | - $matchingProvider = array_filter($this->getRegisteredProviders(), function (ICustomTemplateProvider $provider) use ($templateType) { |
|
159 | + $matchingProvider = array_filter($this->getRegisteredProviders(), function(ICustomTemplateProvider $provider) use ($templateType) { |
|
160 | 160 | return $templateType === get_class($provider); |
161 | 161 | }); |
162 | 162 | $provider = array_shift($matchingProvider); |
@@ -257,8 +257,8 @@ discard block |
||
257 | 257 | $this->userId = $userId; |
258 | 258 | } |
259 | 259 | |
260 | - $defaultSkeletonDirectory = \OC::$SERVERROOT . '/core/skeleton'; |
|
261 | - $defaultTemplateDirectory = \OC::$SERVERROOT . '/core/skeleton/Templates'; |
|
260 | + $defaultSkeletonDirectory = \OC::$SERVERROOT.'/core/skeleton'; |
|
261 | + $defaultTemplateDirectory = \OC::$SERVERROOT.'/core/skeleton/Templates'; |
|
262 | 262 | $skeletonPath = $this->config->getSystemValue('skeletondirectory', $defaultSkeletonDirectory); |
263 | 263 | $skeletonTemplatePath = $this->config->getSystemValue('templatedirectory', $defaultTemplateDirectory); |
264 | 264 | $isDefaultSkeleton = $skeletonPath === $defaultSkeletonDirectory; |
@@ -268,7 +268,7 @@ discard block |
||
268 | 268 | try { |
269 | 269 | $l10n = $this->l10nFactory->get('lib', $userLang); |
270 | 270 | $userFolder = $this->rootFolder->getUserFolder($this->userId); |
271 | - $userTemplatePath = $path ?? $l10n->t('Templates') . '/'; |
|
271 | + $userTemplatePath = $path ?? $l10n->t('Templates').'/'; |
|
272 | 272 | |
273 | 273 | // Initial user setup without a provided path |
274 | 274 | if ($path === null) { |
@@ -277,7 +277,7 @@ discard block |
||
277 | 277 | if (!$userFolder->nodeExists('Templates')) { |
278 | 278 | return ''; |
279 | 279 | } |
280 | - $newPath = Filesystem::normalizePath($userFolder->getPath() . '/' . $userTemplatePath); |
|
280 | + $newPath = Filesystem::normalizePath($userFolder->getPath().'/'.$userTemplatePath); |
|
281 | 281 | if ($newPath !== $userFolder->get('Templates')->getPath()) { |
282 | 282 | $userFolder->get('Templates')->move($newPath); |
283 | 283 | } |
@@ -315,7 +315,7 @@ discard block |
||
315 | 315 | } |
316 | 316 | |
317 | 317 | if ($path !== null && $isDefaultSkeleton && $isDefaultTemplates && $folderIsEmpty) { |
318 | - $localizedSkeletonPath = $this->getLocalizedTemplatePath($skeletonPath . '/Templates', $userLang); |
|
318 | + $localizedSkeletonPath = $this->getLocalizedTemplatePath($skeletonPath.'/Templates', $userLang); |
|
319 | 319 | if (!empty($localizedSkeletonPath) && file_exists($localizedSkeletonPath)) { |
320 | 320 | \OC_Util::copyr($localizedSkeletonPath, $folder); |
321 | 321 | $userFolder->getStorage()->getScanner()->scan($folder->getInternalPath(), Scanner::SCAN_RECURSIVE); |
@@ -327,7 +327,7 @@ discard block |
||
327 | 327 | $this->setTemplatePath($path ?? ''); |
328 | 328 | return $this->getTemplatePath(); |
329 | 329 | } catch (\Throwable $e) { |
330 | - $this->logger->error('Failed to initialize templates directory to user language ' . $userLang . ' for ' . $userId, ['app' => 'files_templates', 'exception' => $e]); |
|
330 | + $this->logger->error('Failed to initialize templates directory to user language '.$userLang.' for '.$userId, ['app' => 'files_templates', 'exception' => $e]); |
|
331 | 331 | } |
332 | 332 | $this->setTemplatePath(''); |
333 | 333 | return $this->getTemplatePath(); |
@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | $qb = $this->dbc->getQueryBuilder(); |
75 | 75 | $qb->select(['id', 'principaluri']) |
76 | 76 | ->from('dav_shares') |
77 | - ->where($qb->expr()->like('principaluri', $qb->createNamedParameter(self::GROUP_PRINCIPAL_PREFIX . '%'))); |
|
77 | + ->where($qb->expr()->like('principaluri', $qb->createNamedParameter(self::GROUP_PRINCIPAL_PREFIX.'%'))); |
|
78 | 78 | |
79 | 79 | $updateQuery = $this->dbc->getQueryBuilder(); |
80 | 80 | $updateQuery->update('dav_shares') |
@@ -100,7 +100,7 @@ discard block |
||
100 | 100 | // + AND there are no ambivalent groups |
101 | 101 | |
102 | 102 | try { |
103 | - $fixedPrincipal = self::GROUP_PRINCIPAL_PREFIX . $encodedGid; |
|
103 | + $fixedPrincipal = self::GROUP_PRINCIPAL_PREFIX.$encodedGid; |
|
104 | 104 | $logParameters = [ |
105 | 105 | 'app' => 'core', |
106 | 106 | 'id' => $share['id'], |
@@ -101,7 +101,7 @@ |
||
101 | 101 | } |
102 | 102 | } |
103 | 103 | } catch (Throwable $e) { |
104 | - $this->logger->warning('Could not read calendar data for interaction events: ' . $e->getMessage(), [ |
|
104 | + $this->logger->warning('Could not read calendar data for interaction events: '.$e->getMessage(), [ |
|
105 | 105 | 'exception' => $e, |
106 | 106 | ]); |
107 | 107 | } |