@@ -127,7 +127,7 @@ discard block |
||
127 | 127 | return [ |
128 | 128 | '{DAV:}displayname' => $this->calendar->getDisplayName() ?: $this->calendar->getKey(), |
129 | 129 | '{http://apple.com/ns/ical/}calendar-color' => $this->calendar->getDisplayColor() ?: '#0082c9', |
130 | - '{' . Plugin::NS_CALDAV . '}supported-calendar-component-set' => new SupportedCalendarComponentSet(['VEVENT', 'VJOURNAL', 'VTODO']), |
|
130 | + '{'.Plugin::NS_CALDAV.'}supported-calendar-component-set' => new SupportedCalendarComponentSet(['VEVENT', 'VJOURNAL', 'VTODO']), |
|
131 | 131 | ]; |
132 | 132 | } |
133 | 133 | |
@@ -190,14 +190,14 @@ discard block |
||
190 | 190 | // We need to group by UID (actually by filename but we do not have that information) |
191 | 191 | $result = []; |
192 | 192 | foreach ($objects as $object) { |
193 | - $uid = (string)$object['UID'] ?: uniqid(); |
|
193 | + $uid = (string) $object['UID'] ?: uniqid(); |
|
194 | 194 | if (!isset($result[$uid])) { |
195 | 195 | $result[$uid] = []; |
196 | 196 | } |
197 | 197 | $result[$uid][] = $object; |
198 | 198 | } |
199 | 199 | |
200 | - return array_map(function (array $children) { |
|
200 | + return array_map(function(array $children) { |
|
201 | 201 | return new CalendarObject($this, $this->calendar, new VCalendar($children)); |
202 | 202 | }, $result); |
203 | 203 | } |
@@ -40,5 +40,5 @@ |
||
40 | 40 | * @since 25.0.0 |
41 | 41 | * @since 27.0.0 return value may overflow from int to float |
42 | 42 | */ |
43 | - public function getEstimatedExportSize(IUser $user): int|float; |
|
43 | + public function getEstimatedExportSize(IUser $user): int | float; |
|
44 | 44 | } |
@@ -49,7 +49,7 @@ |
||
49 | 49 | // Currently query has to have exactly one search condition. If no media type is provided, |
50 | 50 | // we fall back to the presence of a system tag. |
51 | 51 | if ($filteredMediaType !== '') { |
52 | - $mimeOperator = new SearchComparison(ISearchComparison::COMPARE_LIKE, 'mimetype', $filteredMediaType . '/%'); |
|
52 | + $mimeOperator = new SearchComparison(ISearchComparison::COMPARE_LIKE, 'mimetype', $filteredMediaType.'/%'); |
|
53 | 53 | $operator = new SearchBinaryOperator(ISearchBinaryOperator::OPERATOR_AND, [$operator, $mimeOperator]); |
54 | 54 | } |
55 | 55 |
@@ -86,9 +86,9 @@ discard block |
||
86 | 86 | do { |
87 | 87 | $users = $backend->getUsers('', $limit, $offset); |
88 | 88 | foreach ($users as $user) { |
89 | - $output->writeln('Scanning all files for ' . $user); |
|
89 | + $output->writeln('Scanning all files for '.$user); |
|
90 | 90 | $this->setupUserFS($user); |
91 | - $result = $result && $this->scanFolder($output, '/' . $user); |
|
91 | + $result = $result && $this->scanFolder($output, '/'.$user); |
|
92 | 92 | } |
93 | 93 | $offset += $limit; |
94 | 94 | } while (count($users) >= $limit); |
@@ -106,7 +106,7 @@ discard block |
||
106 | 106 | $clean = true; |
107 | 107 | |
108 | 108 | foreach ($this->rootView->getDirectoryContent($folder) as $item) { |
109 | - $path = $folder . '/' . $item['name']; |
|
109 | + $path = $folder.'/'.$item['name']; |
|
110 | 110 | if ($this->rootView->is_dir($path)) { |
111 | 111 | if ($this->scanFolder($output, $path) === false) { |
112 | 112 | $clean = false; |
@@ -120,7 +120,7 @@ discard block |
||
120 | 120 | $stats = $this->rootView->stat($path); |
121 | 121 | if (!isset($stats['hasHeader']) || $stats['hasHeader'] === false) { |
122 | 122 | $clean = false; |
123 | - $output->writeln($path . ' does not have a proper header'); |
|
123 | + $output->writeln($path.' does not have a proper header'); |
|
124 | 124 | } |
125 | 125 | } |
126 | 126 | } |
@@ -99,7 +99,7 @@ |
||
99 | 99 | if (!$e->isRetryable() || $i === ($maxRetries - 1)) { |
100 | 100 | throw $e; |
101 | 101 | } |
102 | - logger('core')->warning('Retrying operation after retryable exception.', [ 'exception' => $e ]); |
|
102 | + logger('core')->warning('Retrying operation after retryable exception.', ['exception' => $e]); |
|
103 | 103 | } |
104 | 104 | } |
105 | 105 | } |
@@ -66,10 +66,10 @@ |
||
66 | 66 | return 1; |
67 | 67 | } |
68 | 68 | if (!isset($modules[$defaultModule])) { |
69 | - $output->writeln('<error>The current default module does not exist: ' . $defaultModule . '</error>'); |
|
69 | + $output->writeln('<error>The current default module does not exist: '.$defaultModule.'</error>'); |
|
70 | 70 | return 1; |
71 | 71 | } |
72 | - $output->writeln('Default module: ' . $defaultModule); |
|
72 | + $output->writeln('Default module: '.$defaultModule); |
|
73 | 73 | |
74 | 74 | return 0; |
75 | 75 | } |
@@ -186,7 +186,7 @@ discard block |
||
186 | 186 | if (!is_array($supportedArchitectures)) { |
187 | 187 | $supportedArchitectures = [$supportedArchitectures]; |
188 | 188 | } |
189 | - $supportedArchitectures = array_map(function ($architecture) { |
|
189 | + $supportedArchitectures = array_map(function($architecture) { |
|
190 | 190 | return $this->getValue($architecture); |
191 | 191 | }, $supportedArchitectures); |
192 | 192 | $currentArchitecture = $this->platform->getArchitecture(); |
@@ -213,7 +213,7 @@ discard block |
||
213 | 213 | if (!is_array($supportedDatabases)) { |
214 | 214 | $supportedDatabases = [$supportedDatabases]; |
215 | 215 | } |
216 | - $supportedDatabases = array_map(function ($db) { |
|
216 | + $supportedDatabases = array_map(function($db) { |
|
217 | 217 | return $this->getValue($db); |
218 | 218 | }, $supportedDatabases); |
219 | 219 | $currentDatabase = $this->platform->getDatabase(); |
@@ -313,7 +313,7 @@ discard block |
||
313 | 313 | return $missing; |
314 | 314 | } |
315 | 315 | if (is_array($oss)) { |
316 | - $oss = array_map(function ($os) { |
|
316 | + $oss = array_map(function($os) { |
|
317 | 317 | return $this->getValue($os); |
318 | 318 | }, $oss); |
319 | 319 | } else { |
@@ -384,7 +384,7 @@ discard block |
||
384 | 384 | return '10'; |
385 | 385 | default: |
386 | 386 | if (str_starts_with($version, '9.1.')) { |
387 | - $version = '10.0.' . substr($version, 4); |
|
387 | + $version = '10.0.'.substr($version, 4); |
|
388 | 388 | } |
389 | 389 | return $version; |
390 | 390 | } |
@@ -398,6 +398,6 @@ discard block |
||
398 | 398 | if (isset($element['@value'])) { |
399 | 399 | return $element['@value']; |
400 | 400 | } |
401 | - return (string)$element; |
|
401 | + return (string) $element; |
|
402 | 402 | } |
403 | 403 | } |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | */ |
62 | 62 | public function getTableNamesWithoutPrefix() { |
63 | 63 | $tableNames = $this->schema->getTableNames(); |
64 | - return array_map(function ($tableName) { |
|
64 | + return array_map(function($tableName) { |
|
65 | 65 | if (str_starts_with($tableName, $this->connection->getPrefix())) { |
66 | 66 | return substr($tableName, strlen($this->connection->getPrefix())); |
67 | 67 | } |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | * @throws \Doctrine\DBAL\Schema\SchemaException |
87 | 87 | */ |
88 | 88 | public function getTable($tableName) { |
89 | - return $this->schema->getTable($this->connection->getPrefix() . $tableName); |
|
89 | + return $this->schema->getTable($this->connection->getPrefix().$tableName); |
|
90 | 90 | } |
91 | 91 | |
92 | 92 | /** |
@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | * @return boolean |
98 | 98 | */ |
99 | 99 | public function hasTable($tableName) { |
100 | - return $this->schema->hasTable($this->connection->getPrefix() . $tableName); |
|
100 | + return $this->schema->hasTable($this->connection->getPrefix().$tableName); |
|
101 | 101 | } |
102 | 102 | |
103 | 103 | /** |
@@ -108,7 +108,7 @@ discard block |
||
108 | 108 | */ |
109 | 109 | public function createTable($tableName) { |
110 | 110 | unset($this->tablesToDelete[$tableName]); |
111 | - return $this->schema->createTable($this->connection->getPrefix() . $tableName); |
|
111 | + return $this->schema->createTable($this->connection->getPrefix().$tableName); |
|
112 | 112 | } |
113 | 113 | |
114 | 114 | /** |
@@ -119,7 +119,7 @@ discard block |
||
119 | 119 | */ |
120 | 120 | public function dropTable($tableName) { |
121 | 121 | $this->tablesToDelete[$tableName] = true; |
122 | - return $this->schema->dropTable($this->connection->getPrefix() . $tableName); |
|
122 | + return $this->schema->dropTable($this->connection->getPrefix().$tableName); |
|
123 | 123 | } |
124 | 124 | |
125 | 125 | /** |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | public static function buildAppNamespace(string $appId, string $topNamespace = 'OCA\\'): string { |
67 | 67 | // Hit the cache! |
68 | 68 | if (isset(self::$nameSpaceCache[$appId])) { |
69 | - return $topNamespace . self::$nameSpaceCache[$appId]; |
|
69 | + return $topNamespace.self::$nameSpaceCache[$appId]; |
|
70 | 70 | } |
71 | 71 | |
72 | 72 | $appInfo = \OCP\Server::get(IAppManager::class)->getAppInfo($appId); |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | } |
89 | 89 | } |
90 | 90 | |
91 | - return $topNamespace . self::$nameSpaceCache[$appId]; |
|
91 | + return $topNamespace.self::$nameSpaceCache[$appId]; |
|
92 | 92 | } |
93 | 93 | |
94 | 94 | public static function getAppIdForClass(string $className, string $topNamespace = 'OCA\\'): ?string { |
@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | } |
98 | 98 | |
99 | 99 | foreach (self::$nameSpaceCache as $appId => $namespace) { |
100 | - if (str_starts_with($className, $topNamespace . $namespace . '\\')) { |
|
100 | + if (str_starts_with($className, $topNamespace.$namespace.'\\')) { |
|
101 | 101 | return $appId; |
102 | 102 | } |
103 | 103 | } |
@@ -151,7 +151,7 @@ discard block |
||
151 | 151 | if (str_contains($controllerName, '\\Controller\\')) { |
152 | 152 | // This is from a global registered app route that is not enabled. |
153 | 153 | [/*OC(A)*/, $app, /* Controller/Name*/] = explode('\\', $controllerName, 3); |
154 | - throw new HintException('App ' . strtolower($app) . ' is not enabled'); |
|
154 | + throw new HintException('App '.strtolower($app).' is not enabled'); |
|
155 | 155 | } |
156 | 156 | |
157 | 157 | if ($appName === 'core') { |
@@ -159,7 +159,7 @@ discard block |
||
159 | 159 | } else { |
160 | 160 | $appNameSpace = self::buildAppNamespace($appName); |
161 | 161 | } |
162 | - $controllerName = $appNameSpace . '\\Controller\\' . $controllerName; |
|
162 | + $controllerName = $appNameSpace.'\\Controller\\'.$controllerName; |
|
163 | 163 | $controller = $container->query($controllerName); |
164 | 164 | } |
165 | 165 | |
@@ -191,8 +191,8 @@ discard block |
||
191 | 191 | $eventLogger->end('runtime'); |
192 | 192 | $profile = $profiler->collect($container->get(IRequest::class), $response); |
193 | 193 | $profiler->saveProfile($profile); |
194 | - $io->setHeader('X-Debug-Token:' . $profile->getToken()); |
|
195 | - $io->setHeader('Server-Timing: token;desc="' . $profile->getToken() . '"'); |
|
194 | + $io->setHeader('X-Debug-Token:'.$profile->getToken()); |
|
195 | + $io->setHeader('Server-Timing: token;desc="'.$profile->getToken().'"'); |
|
196 | 196 | } |
197 | 197 | |
198 | 198 | if (!is_null($httpHeaders)) { |
@@ -200,7 +200,7 @@ discard block |
||
200 | 200 | } |
201 | 201 | |
202 | 202 | foreach ($responseHeaders as $name => $value) { |
203 | - $io->setHeader($name . ': ' . $value); |
|
203 | + $io->setHeader($name.': '.$value); |
|
204 | 204 | } |
205 | 205 | |
206 | 206 | foreach ($responseCookies as $name => $value) { |
@@ -230,7 +230,7 @@ discard block |
||
230 | 230 | */ |
231 | 231 | $emptyResponse = false; |
232 | 232 | if (preg_match('/^HTTP\/\d\.\d (\d{3}) .*$/', $httpHeaders, $matches)) { |
233 | - $status = (int)$matches[1]; |
|
233 | + $status = (int) $matches[1]; |
|
234 | 234 | if ($status === Http::STATUS_NO_CONTENT || $status === Http::STATUS_NOT_MODIFIED) { |
235 | 235 | $emptyResponse = true; |
236 | 236 | } |
@@ -240,7 +240,7 @@ discard block |
||
240 | 240 | if ($response instanceof ICallbackResponse) { |
241 | 241 | $response->callback($io); |
242 | 242 | } elseif (!is_null($output)) { |
243 | - $io->setHeader('Content-Length: ' . strlen($output)); |
|
243 | + $io->setHeader('Content-Length: '.strlen($output)); |
|
244 | 244 | $io->setOutput($output); |
245 | 245 | } |
246 | 246 | } |
@@ -263,7 +263,7 @@ discard block |
||
263 | 263 | |
264 | 264 | $dispatcher = $container['Dispatcher']; |
265 | 265 | |
266 | - [, , $output] = $dispatcher->dispatch($controller, $methodName); |
|
266 | + [,, $output] = $dispatcher->dispatch($controller, $methodName); |
|
267 | 267 | return $output; |
268 | 268 | } |
269 | 269 | } |