@@ -404,7 +404,7 @@ discard block |
||
| 404 | 404 | foreach ($keys as $key) { |
| 405 | 405 | if (!array_key_exists($key, $arr)) { |
| 406 | 406 | throw new MalformedArrayException( |
| 407 | - 'source: ' . json_encode($arr) . ' - missing key: ' . $key |
|
| 407 | + 'source: '.json_encode($arr).' - missing key: '.$key |
|
| 408 | 408 | ); |
| 409 | 409 | } |
| 410 | 410 | } |
@@ -417,7 +417,7 @@ discard block |
||
| 417 | 417 | protected function cleanArray(array &$arr) { |
| 418 | 418 | $arr = array_filter( |
| 419 | 419 | $arr, |
| 420 | - function ($v) { |
|
| 420 | + function($v) { |
|
| 421 | 421 | if (is_string($v)) { |
| 422 | 422 | return ($v !== ''); |
| 423 | 423 | } |
@@ -124,7 +124,7 @@ |
||
| 124 | 124 | |
| 125 | 125 | foreach ($shares['users'] ?? [] as $user => $node) { |
| 126 | 126 | if (!is_string($user)) { |
| 127 | - $this->logger->warning('malformed access list: ' . json_encode($shares)); |
|
| 127 | + $this->logger->warning('malformed access list: '.json_encode($shares)); |
|
| 128 | 128 | continue; |
| 129 | 129 | } |
| 130 | 130 | if (in_array($user, $users) || $this->userManager->get($user) === null) { |
@@ -40,7 +40,7 @@ |
||
| 40 | 40 | (string)$node->getId(), |
| 41 | 41 | IIndex::INDEX_META |
| 42 | 42 | ); |
| 43 | - } catch (InvalidPathException|NotFoundException $e) { |
|
| 43 | + } catch (InvalidPathException | NotFoundException $e) { |
|
| 44 | 44 | $this->exception($e); |
| 45 | 45 | } |
| 46 | 46 | } |
@@ -37,7 +37,7 @@ |
||
| 37 | 37 | $this->fullTextSearchManager->updateIndexStatus( |
| 38 | 38 | 'files', (string)$node->getId(), IIndex::INDEX_REMOVE, true |
| 39 | 39 | ); |
| 40 | - } catch (InvalidPathException|NotFoundException $e) { |
|
| 40 | + } catch (InvalidPathException | NotFoundException $e) { |
|
| 41 | 41 | $this->exception($e); |
| 42 | 42 | } |
| 43 | 43 | } |
@@ -38,7 +38,7 @@ |
||
| 38 | 38 | $this->fullTextSearchManager->updateIndexStatus( |
| 39 | 39 | 'files', (string)$node->getId(), IIndex::INDEX_CONTENT |
| 40 | 40 | ); |
| 41 | - } catch (InvalidPathException|NotFoundException $e) { |
|
| 41 | + } catch (InvalidPathException | NotFoundException $e) { |
|
| 42 | 42 | $this->exception($e); |
| 43 | 43 | } |
| 44 | 44 | } |
@@ -42,7 +42,7 @@ |
||
| 42 | 42 | $this->fullTextSearchManager->createIndex( |
| 43 | 43 | 'files', (string)$node->getId(), $user->getUID(), IIndex::INDEX_FULL |
| 44 | 44 | ); |
| 45 | - } catch (InvalidPathException|NotFoundException $e) { |
|
| 45 | + } catch (InvalidPathException | NotFoundException $e) { |
|
| 46 | 46 | $this->exception($e); |
| 47 | 47 | } |
| 48 | 48 | } |
@@ -37,7 +37,7 @@ |
||
| 37 | 37 | $this->fullTextSearchManager->updateIndexStatus( |
| 38 | 38 | 'files', (string)$node->getId(), IIndex::INDEX_META |
| 39 | 39 | ); |
| 40 | - } catch (InvalidPathException|NotFoundException $e) { |
|
| 40 | + } catch (InvalidPathException | NotFoundException $e) { |
|
| 41 | 41 | $this->exception($e); |
| 42 | 42 | } |
| 43 | 43 | } |
@@ -68,10 +68,10 @@ discard block |
||
| 68 | 68 | */ |
| 69 | 69 | private function searchQueryShareNames(ISearchRequest $request) { |
| 70 | 70 | $username = $this->filesService->secureUsername($request->getAuthor()); |
| 71 | - $request->addField('share_names.' . $username); |
|
| 71 | + $request->addField('share_names.'.$username); |
|
| 72 | 72 | |
| 73 | 73 | $request->addWildcardField('title'); |
| 74 | - $request->addWildcardField('share_names.' . $username); |
|
| 74 | + $request->addWildcardField('share_names.'.$username); |
|
| 75 | 75 | } |
| 76 | 76 | |
| 77 | 77 | |
@@ -85,11 +85,11 @@ discard block |
||
| 85 | 85 | } |
| 86 | 86 | |
| 87 | 87 | $username = $this->filesService->secureUsername($request->getAuthor()); |
| 88 | - $currentDir = trim(str_replace('//', '/', $currentDir), '/') . '/'; // we want the format 'folder/' |
|
| 88 | + $currentDir = trim(str_replace('//', '/', $currentDir), '/').'/'; // we want the format 'folder/' |
|
| 89 | 89 | $request->addRegexFilters( |
| 90 | 90 | [ |
| 91 | - ['share_names.' . $username => $currentDir . '.*'], |
|
| 92 | - ['title' => $currentDir . '.*'] |
|
| 91 | + ['share_names.'.$username => $currentDir.'.*'], |
|
| 92 | + ['title' => $currentDir.'.*'] |
|
| 93 | 93 | ] |
| 94 | 94 | ); |
| 95 | 95 | } |
@@ -107,8 +107,8 @@ discard block |
||
| 107 | 107 | $username = $this->filesService->secureUsername($request->getAuthor()); |
| 108 | 108 | $request->addRegexFilters( |
| 109 | 109 | [ |
| 110 | - ['share_names.' . $username => '.*\.' . $extension], |
|
| 111 | - ['title' => '.*\.' . $extension] |
|
| 110 | + ['share_names.'.$username => '.*\.'.$extension], |
|
| 111 | + ['title' => '.*\.'.$extension] |
|
| 112 | 112 | ] |
| 113 | 113 | ); |
| 114 | 114 | } |
@@ -141,7 +141,7 @@ discard block |
||
| 141 | 141 | |
| 142 | 142 | if (in_array('filename', $in)) { |
| 143 | 143 | $username = $this->filesService->secureUsername($request->getAuthor()); |
| 144 | - $request->addLimitField('share_names.' . $username); |
|
| 144 | + $request->addLimitField('share_names.'.$username); |
|
| 145 | 145 | $request->addLimitField('title'); |
| 146 | 146 | } |
| 147 | 147 | |
@@ -315,6 +315,6 @@ discard block |
||
| 315 | 315 | * @return string |
| 316 | 316 | */ |
| 317 | 317 | private function getWebdavId(int $fileId): string { |
| 318 | - return sprintf('%08s', $fileId) . $this->config->getSystemValue('instanceid'); |
|
| 318 | + return sprintf('%08s', $fileId).$this->config->getSystemValue('instanceid'); |
|
| 319 | 319 | } |
| 320 | 320 | } |
@@ -61,7 +61,7 @@ |
||
| 61 | 61 | } |
| 62 | 62 | |
| 63 | 63 | public function setDocumentIndexOption(FilesDocument $document, string $option) { |
| 64 | - $document->getIndex()->addOption('_' . $option, $this->getCurrentIndexOptionStatus($option) ? '1' : '0'); |
|
| 64 | + $document->getIndex()->addOption('_'.$option, $this->getCurrentIndexOptionStatus($option) ? '1' : '0'); |
|
| 65 | 65 | } |
| 66 | 66 | |
| 67 | 67 | /** |