@@ -194,7 +194,7 @@ discard block |
||
194 | 194 | if ($this->lastLogin === null) { |
195 | 195 | $this->fetchDetails(); |
196 | 196 | } |
197 | - return (int)$this->lastLogin; |
|
197 | + return (int) $this->lastLogin; |
|
198 | 198 | } |
199 | 199 | |
200 | 200 | /** |
@@ -205,14 +205,14 @@ discard block |
||
205 | 205 | if ($this->foundDeleted === null) { |
206 | 206 | $this->fetchDetails(); |
207 | 207 | } |
208 | - return (int)$this->foundDeleted; |
|
208 | + return (int) $this->foundDeleted; |
|
209 | 209 | } |
210 | 210 | |
211 | 211 | public function getExtStorageHome(): string { |
212 | 212 | if ($this->extStorageHome === null) { |
213 | 213 | $this->fetchDetails(); |
214 | 214 | } |
215 | - return (string)$this->extStorageHome; |
|
215 | + return (string) $this->extStorageHome; |
|
216 | 216 | } |
217 | 217 | |
218 | 218 | /** |
@@ -20,6 +20,6 @@ |
||
20 | 20 | ); |
21 | 21 | } |
22 | 22 | |
23 | -require_once __DIR__ . '/composer/autoload_real.php'; |
|
23 | +require_once __DIR__.'/composer/autoload_real.php'; |
|
24 | 24 | |
25 | 25 | return ComposerAutoloaderInitTheming::getLoader(); |
@@ -9,7 +9,7 @@ discard block |
||
9 | 9 | public static function loadClassLoader($class) |
10 | 10 | { |
11 | 11 | if ('Composer\Autoload\ClassLoader' === $class) { |
12 | - require __DIR__ . '/ClassLoader.php'; |
|
12 | + require __DIR__.'/ClassLoader.php'; |
|
13 | 13 | } |
14 | 14 | } |
15 | 15 | |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__)); |
27 | 27 | spl_autoload_unregister(array('ComposerAutoloaderInitTheming', 'loadClassLoader')); |
28 | 28 | |
29 | - require __DIR__ . '/autoload_static.php'; |
|
29 | + require __DIR__.'/autoload_static.php'; |
|
30 | 30 | call_user_func(\Composer\Autoload\ComposerStaticInitTheming::getInitializer($loader)); |
31 | 31 | |
32 | 32 | $loader->setClassMapAuthoritative(true); |
@@ -370,18 +370,18 @@ discard block |
||
370 | 370 | private function findFileWithExtension($class, $ext) |
371 | 371 | { |
372 | 372 | // PSR-4 lookup |
373 | - $logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext; |
|
373 | + $logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR).$ext; |
|
374 | 374 | |
375 | 375 | $first = $class[0]; |
376 | 376 | if (isset($this->prefixLengthsPsr4[$first])) { |
377 | 377 | $subPath = $class; |
378 | 378 | while (false !== $lastPos = strrpos($subPath, '\\')) { |
379 | 379 | $subPath = substr($subPath, 0, $lastPos); |
380 | - $search = $subPath . '\\'; |
|
380 | + $search = $subPath.'\\'; |
|
381 | 381 | if (isset($this->prefixDirsPsr4[$search])) { |
382 | - $pathEnd = DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $lastPos + 1); |
|
382 | + $pathEnd = DIRECTORY_SEPARATOR.substr($logicalPathPsr4, $lastPos + 1); |
|
383 | 383 | foreach ($this->prefixDirsPsr4[$search] as $dir) { |
384 | - if (file_exists($file = $dir . $pathEnd)) { |
|
384 | + if (file_exists($file = $dir.$pathEnd)) { |
|
385 | 385 | return $file; |
386 | 386 | } |
387 | 387 | } |
@@ -391,7 +391,7 @@ discard block |
||
391 | 391 | |
392 | 392 | // PSR-4 fallback dirs |
393 | 393 | foreach ($this->fallbackDirsPsr4 as $dir) { |
394 | - if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr4)) { |
|
394 | + if (file_exists($file = $dir.DIRECTORY_SEPARATOR.$logicalPathPsr4)) { |
|
395 | 395 | return $file; |
396 | 396 | } |
397 | 397 | } |
@@ -403,14 +403,14 @@ discard block |
||
403 | 403 | . strtr(substr($logicalPathPsr4, $pos + 1), '_', DIRECTORY_SEPARATOR); |
404 | 404 | } else { |
405 | 405 | // PEAR-like class name |
406 | - $logicalPathPsr0 = strtr($class, '_', DIRECTORY_SEPARATOR) . $ext; |
|
406 | + $logicalPathPsr0 = strtr($class, '_', DIRECTORY_SEPARATOR).$ext; |
|
407 | 407 | } |
408 | 408 | |
409 | 409 | if (isset($this->prefixesPsr0[$first])) { |
410 | 410 | foreach ($this->prefixesPsr0[$first] as $prefix => $dirs) { |
411 | 411 | if (0 === strpos($class, $prefix)) { |
412 | 412 | foreach ($dirs as $dir) { |
413 | - if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) { |
|
413 | + if (file_exists($file = $dir.DIRECTORY_SEPARATOR.$logicalPathPsr0)) { |
|
414 | 414 | return $file; |
415 | 415 | } |
416 | 416 | } |
@@ -420,7 +420,7 @@ discard block |
||
420 | 420 | |
421 | 421 | // PSR-0 fallback dirs |
422 | 422 | foreach ($this->fallbackDirsPsr0 as $dir) { |
423 | - if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) { |
|
423 | + if (file_exists($file = $dir.DIRECTORY_SEPARATOR.$logicalPathPsr0)) { |
|
424 | 424 | return $file; |
425 | 425 | } |
426 | 426 | } |
@@ -158,7 +158,7 @@ discard block |
||
158 | 158 | return implode(' || ', $ranges); |
159 | 159 | } |
160 | 160 | |
161 | - throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); |
|
161 | + throw new \OutOfBoundsException('Package "'.$packageName.'" is not installed'); |
|
162 | 162 | } |
163 | 163 | |
164 | 164 | /** |
@@ -179,7 +179,7 @@ discard block |
||
179 | 179 | return $installed['versions'][$packageName]['version']; |
180 | 180 | } |
181 | 181 | |
182 | - throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); |
|
182 | + throw new \OutOfBoundsException('Package "'.$packageName.'" is not installed'); |
|
183 | 183 | } |
184 | 184 | |
185 | 185 | /** |
@@ -200,7 +200,7 @@ discard block |
||
200 | 200 | return $installed['versions'][$packageName]['pretty_version']; |
201 | 201 | } |
202 | 202 | |
203 | - throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); |
|
203 | + throw new \OutOfBoundsException('Package "'.$packageName.'" is not installed'); |
|
204 | 204 | } |
205 | 205 | |
206 | 206 | /** |
@@ -221,7 +221,7 @@ discard block |
||
221 | 221 | return $installed['versions'][$packageName]['reference']; |
222 | 222 | } |
223 | 223 | |
224 | - throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); |
|
224 | + throw new \OutOfBoundsException('Package "'.$packageName.'" is not installed'); |
|
225 | 225 | } |
226 | 226 | |
227 | 227 | /** |
@@ -238,7 +238,7 @@ discard block |
||
238 | 238 | return isset($installed['versions'][$packageName]['install_path']) ? $installed['versions'][$packageName]['install_path'] : null; |
239 | 239 | } |
240 | 240 | |
241 | - throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); |
|
241 | + throw new \OutOfBoundsException('Package "'.$packageName.'" is not installed'); |
|
242 | 242 | } |
243 | 243 | |
244 | 244 | /** |
@@ -267,7 +267,7 @@ discard block |
||
267 | 267 | // only require the installed.php file if this file is loaded from its dumped location, |
268 | 268 | // and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937 |
269 | 269 | if (substr(__DIR__, -8, 1) !== 'C') { |
270 | - self::$installed = include __DIR__ . '/installed.php'; |
|
270 | + self::$installed = include __DIR__.'/installed.php'; |
|
271 | 271 | } else { |
272 | 272 | self::$installed = array(); |
273 | 273 | } |
@@ -343,7 +343,7 @@ discard block |
||
343 | 343 | // and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937 |
344 | 344 | if (substr(__DIR__, -8, 1) !== 'C') { |
345 | 345 | /** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $required */ |
346 | - $required = require __DIR__ . '/installed.php'; |
|
346 | + $required = require __DIR__.'/installed.php'; |
|
347 | 347 | self::$installed = $required; |
348 | 348 | } else { |
349 | 349 | self::$installed = array(); |
@@ -47,7 +47,7 @@ |
||
47 | 47 | * @param ISearchOperator $operator |
48 | 48 | * @return void |
49 | 49 | */ |
50 | - public function processOperator(ISearchOperator &$operator) { |
|
50 | + public function processOperator(ISearchOperator & $operator) { |
|
51 | 51 | if ($operator instanceof ISearchBinaryOperator) { |
52 | 52 | foreach ($operator->getArguments() as $argument) { |
53 | 53 | $this->processOperator($argument); |
@@ -123,7 +123,7 @@ discard block |
||
123 | 123 | $encryptedRecoveryKey = $this->crypt->encryptPrivateKey($decryptedRecoveryKey, $newPassword); |
124 | 124 | $header = $this->crypt->generateHeader(); |
125 | 125 | if ($encryptedRecoveryKey) { |
126 | - $this->keyManager->setSystemPrivateKey($this->keyManager->getRecoveryKeyId(), $header . $encryptedRecoveryKey); |
|
126 | + $this->keyManager->setSystemPrivateKey($this->keyManager->getRecoveryKeyId(), $header.$encryptedRecoveryKey); |
|
127 | 127 | return true; |
128 | 128 | } |
129 | 129 | return false; |
@@ -184,9 +184,9 @@ discard block |
||
184 | 184 | $value); |
185 | 185 | |
186 | 186 | if ($value === '1') { |
187 | - $this->addRecoveryKeys('/' . $this->user->getUID() . '/files/'); |
|
187 | + $this->addRecoveryKeys('/'.$this->user->getUID().'/files/'); |
|
188 | 188 | } else { |
189 | - $this->removeRecoveryKeys('/' . $this->user->getUID() . '/files/'); |
|
189 | + $this->removeRecoveryKeys('/'.$this->user->getUID().'/files/'); |
|
190 | 190 | } |
191 | 191 | |
192 | 192 | return true; |
@@ -203,7 +203,7 @@ discard block |
||
203 | 203 | foreach ($dirContent as $item) { |
204 | 204 | $filePath = $item->getPath(); |
205 | 205 | if ($item['type'] === 'dir') { |
206 | - $this->addRecoveryKeys($filePath . '/'); |
|
206 | + $this->addRecoveryKeys($filePath.'/'); |
|
207 | 207 | } else { |
208 | 208 | $fileKey = $this->keyManager->getFileKey($filePath, $this->user->getUID(), null); |
209 | 209 | if (!empty($fileKey)) { |
@@ -233,7 +233,7 @@ discard block |
||
233 | 233 | foreach ($dirContent as $item) { |
234 | 234 | $filePath = $item->getPath(); |
235 | 235 | if ($item['type'] === 'dir') { |
236 | - $this->removeRecoveryKeys($filePath . '/'); |
|
236 | + $this->removeRecoveryKeys($filePath.'/'); |
|
237 | 237 | } else { |
238 | 238 | $this->keyManager->deleteShareKey($filePath, $this->keyManager->getRecoveryKeyId()); |
239 | 239 | } |
@@ -248,7 +248,7 @@ discard block |
||
248 | 248 | |
249 | 249 | $privateKey = $this->crypt->decryptPrivateKey($encryptedKey, $recoveryPassword); |
250 | 250 | if ($privateKey !== false) { |
251 | - $this->recoverAllFiles('/' . $user . '/files/', $privateKey, $user); |
|
251 | + $this->recoverAllFiles('/'.$user.'/files/', $privateKey, $user); |
|
252 | 252 | } |
253 | 253 | } |
254 | 254 | |
@@ -262,7 +262,7 @@ discard block |
||
262 | 262 | // Get relative path from encryption/keyfiles |
263 | 263 | $filePath = $item->getPath(); |
264 | 264 | if ($this->view->is_dir($filePath)) { |
265 | - $this->recoverAllFiles($filePath . '/', $privateKey, $uid); |
|
265 | + $this->recoverAllFiles($filePath.'/', $privateKey, $uid); |
|
266 | 266 | } else { |
267 | 267 | $this->recoverFile($filePath, $privateKey, $uid); |
268 | 268 | } |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | /** @var array<string,string|false> */ |
39 | 39 | protected array $cachedFiles = []; |
40 | 40 | |
41 | - protected function getCachedFile(string $path): string|false { |
|
41 | + protected function getCachedFile(string $path): string | false { |
|
42 | 42 | if (!isset($this->cachedFiles[$path])) { |
43 | 43 | $this->cachedFiles[$path] = $this->toTmpFile($path); |
44 | 44 | } |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | unset($this->cachedFiles[$path]); |
53 | 53 | } |
54 | 54 | |
55 | - protected function toTmpFile(string $path): string|false { //no longer in the storage api, still useful here |
|
55 | + protected function toTmpFile(string $path): string | false { //no longer in the storage api, still useful here |
|
56 | 56 | $source = $this->fopen($path, 'r'); |
57 | 57 | if (!$source) { |
58 | 58 | return false; |
@@ -42,19 +42,19 @@ |
||
42 | 42 | } |
43 | 43 | |
44 | 44 | public function run(IOutput $output) { |
45 | - $updateDir = $this->config->getSystemValue('updatedirectory', null) ?? $this->config->getSystemValue('datadirectory', \OC::$SERVERROOT . '/data'); |
|
45 | + $updateDir = $this->config->getSystemValue('updatedirectory', null) ?? $this->config->getSystemValue('datadirectory', \OC::$SERVERROOT.'/data'); |
|
46 | 46 | $instanceId = $this->config->getSystemValueString('instanceid'); |
47 | 47 | |
48 | 48 | if (empty($instanceId)) { |
49 | 49 | return; |
50 | 50 | } |
51 | 51 | |
52 | - $updaterFolderPath = $updateDir . '/updater-' . $instanceId; |
|
53 | - $stepFile = $updaterFolderPath . '/.step'; |
|
52 | + $updaterFolderPath = $updateDir.'/updater-'.$instanceId; |
|
53 | + $stepFile = $updaterFolderPath.'/.step'; |
|
54 | 54 | if (file_exists($stepFile)) { |
55 | 55 | $output->info('.step file exists'); |
56 | 56 | |
57 | - $previousStepFile = $updaterFolderPath . '/.step-previous-update'; |
|
57 | + $previousStepFile = $updaterFolderPath.'/.step-previous-update'; |
|
58 | 58 | |
59 | 59 | // cleanup |
60 | 60 | if (file_exists($previousStepFile)) { |