@@ -58,8 +58,8 @@ |
||
58 | 58 | */ |
59 | 59 | public function postConnect(ConnectionEventArgs $args) { |
60 | 60 | $sensitive = $this->caseSensitiveLike ? 'true' : 'false'; |
61 | - $args->getConnection()->executeUpdate('PRAGMA case_sensitive_like = ' . $sensitive); |
|
62 | - $args->getConnection()->executeUpdate('PRAGMA journal_mode = ' . $this->journalMode); |
|
61 | + $args->getConnection()->executeUpdate('PRAGMA case_sensitive_like = '.$sensitive); |
|
62 | + $args->getConnection()->executeUpdate('PRAGMA journal_mode = '.$this->journalMode); |
|
63 | 63 | /** @var \Doctrine\DBAL\Driver\PDO\Connection $connection */ |
64 | 64 | $connection = $args->getConnection()->getWrappedConnection(); |
65 | 65 | $pdo = $connection->getWrappedConnection(); |
@@ -54,9 +54,9 @@ |
||
54 | 54 | */ |
55 | 55 | public function resynchronizeDatabaseSequences(Connection $conn) { |
56 | 56 | $databaseName = $conn->getDatabase(); |
57 | - $conn->getConfiguration()->setSchemaAssetsFilter(function ($asset) { |
|
57 | + $conn->getConfiguration()->setSchemaAssetsFilter(function($asset) { |
|
58 | 58 | /** @var string|AbstractAsset $asset */ |
59 | - $filterExpression = '/^' . preg_quote($this->config->getSystemValue('dbtableprefix', 'oc_')) . '/'; |
|
59 | + $filterExpression = '/^'.preg_quote($this->config->getSystemValue('dbtableprefix', 'oc_')).'/'; |
|
60 | 60 | if ($asset instanceof AbstractAsset) { |
61 | 61 | return preg_match($filterExpression, $asset->getName()) !== false; |
62 | 62 | } |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | if (empty($this->folderMimeTypeId)) { |
72 | 72 | $query->setParameter('mimetype', 'httpd/unix-directory'); |
73 | 73 | $result = $query->execute(); |
74 | - $this->folderMimeTypeId = (int)$result->fetchOne(); |
|
74 | + $this->folderMimeTypeId = (int) $result->fetchOne(); |
|
75 | 75 | $result->closeCursor(); |
76 | 76 | } |
77 | 77 | |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | // get target mimetype id |
89 | 89 | $query->setParameter('mimetype', $mimetype); |
90 | 90 | $result = $query->execute(); |
91 | - $mimetypeId = (int)$result->fetchOne(); |
|
91 | + $mimetypeId = (int) $result->fetchOne(); |
|
92 | 92 | $result->closeCursor(); |
93 | 93 | |
94 | 94 | if (!$mimetypeId) { |
@@ -100,7 +100,7 @@ discard block |
||
100 | 100 | |
101 | 101 | // change mimetype for files with x extension |
102 | 102 | $update->setParameter('mimetype', $mimetypeId) |
103 | - ->setParameter('name', '%' . $this->connection->escapeLikeParameter('.' . $extension)); |
|
103 | + ->setParameter('name', '%'.$this->connection->escapeLikeParameter('.'.$extension)); |
|
104 | 104 | $count += $update->execute(); |
105 | 105 | } |
106 | 106 |
@@ -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 | } |