@@ -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 | /** |
@@ -158,7 +158,7 @@ |
||
158 | 158 | foreach ($mounts as $path => $mount) { |
159 | 159 | $mountPoint = new MountPoint(); |
160 | 160 | $mountPoint->setId($this->getInt('id', $mount, -1)) |
161 | - ->setPath('/' . $userId . '/files/' . $mount['mount_point']) |
|
161 | + ->setPath('/'.$userId.'/files/'.$mount['mount_point']) |
|
162 | 162 | ->setGroups(array_keys($mount['groups'])); |
163 | 163 | $mountPoints[] = $mountPoint; |
164 | 164 | } |
@@ -116,7 +116,7 @@ discard block |
||
116 | 116 | } catch (NotFoundException $e) { |
117 | 117 | return []; |
118 | 118 | } catch (Throwable $e) { |
119 | - $this->logger->warning('Issue while retrieving rootFolder for ' . $userId, ['exception' => $e]); |
|
119 | + $this->logger->warning('Issue while retrieving rootFolder for '.$userId, ['exception' => $e]); |
|
120 | 120 | return []; |
121 | 121 | } |
122 | 122 | |
@@ -364,7 +364,7 @@ discard block |
||
364 | 364 | $tagIds = $this->systemTagObjectMapper->getTagIdsForObjects([$file->getId()], 'files'); |
365 | 365 | if (array_key_exists($file->getId(), $tagIds)) { |
366 | 366 | $tags = array_values( |
367 | - array_map(function (ISystemTag $tag): string { |
|
367 | + array_map(function(ISystemTag $tag): string { |
|
368 | 368 | return $tag->getName(); |
369 | 369 | }, $this->systemTagManager->getTagsByIds($tagIds[$file->getId()])) |
370 | 370 | ); |
@@ -382,7 +382,7 @@ discard block |
||
382 | 382 | ] |
383 | 383 | ); |
384 | 384 | } else { |
385 | - $this->logger->warning('stat() on File #' . $file->getId() . ' is not an array: ' . json_encode($stat)); |
|
385 | + $this->logger->warning('stat() on File #'.$file->getId().' is not an array: '.json_encode($stat)); |
|
386 | 386 | } |
387 | 387 | |
388 | 388 | return $document; |
@@ -438,7 +438,7 @@ discard block |
||
438 | 438 | } |
439 | 439 | |
440 | 440 | if ($this->userManager->get($userId) === null) { |
441 | - throw new NoUserException('User does not exist: ' . $userId); |
|
441 | + throw new NoUserException('User does not exist: '.$userId); |
|
442 | 442 | } |
443 | 443 | |
444 | 444 | $files = $this->rootFolder->getUserFolder($userId) |
@@ -705,7 +705,7 @@ discard block |
||
705 | 705 | |
706 | 706 | $part = []; |
707 | 707 | foreach ($comments as $comment) { |
708 | - $part[] = '<' . $comment->getActorId() . '> ' . $comment->getMessage(); |
|
708 | + $part[] = '<'.$comment->getActorId().'> '.$comment->getMessage(); |
|
709 | 709 | } |
710 | 710 | |
711 | 711 | $document->addPart('comments', implode(" \n ", $part)); |
@@ -739,7 +739,7 @@ discard block |
||
739 | 739 | $shareNames[$this->secureUsername($username)] |
740 | 740 | = (!is_string($path)) ? $path = '' : $path; |
741 | 741 | } catch (Throwable $e) { |
742 | - $this->logger->debug('Issue while getting information on documentId:' . $document->getId(), ['exception' => $e]); |
|
742 | + $this->logger->debug('Issue while getting information on documentId:'.$document->getId(), ['exception' => $e]); |
|
743 | 743 | } |
744 | 744 | } |
745 | 745 | |
@@ -909,7 +909,7 @@ discard block |
||
909 | 909 | $document->setContent( |
910 | 910 | base64_encode($file->getContent()), IIndexDocument::ENCODED_BASE64 |
911 | 911 | ); |
912 | - } catch (NotPermittedException|LockedException $e) { |
|
912 | + } catch (NotPermittedException | LockedException $e) { |
|
913 | 913 | } |
914 | 914 | } |
915 | 915 | |
@@ -956,7 +956,7 @@ discard block |
||
956 | 956 | |
957 | 957 | // Construct XML |
958 | 958 | $diagram_xml = simplexml_load_string($diagram_str); |
959 | - $content = $content . ' ' . $this->readDrawioXmlValue($diagram_xml); |
|
959 | + $content = $content.' '.$this->readDrawioXmlValue($diagram_xml); |
|
960 | 960 | } |
961 | 961 | } catch (\Throwable $t) { |
962 | 962 | } |
@@ -966,14 +966,14 @@ discard block |
||
966 | 966 | // 20220219 Pass content of inflated drawio graph xml |
967 | 967 | base64_encode($content), IIndexDocument::ENCODED_BASE64 |
968 | 968 | ); |
969 | - } catch (NotPermittedException|LockedException $e) { |
|
969 | + } catch (NotPermittedException | LockedException $e) { |
|
970 | 970 | } |
971 | 971 | } else { |
972 | 972 | try { |
973 | 973 | $document->setContent( |
974 | 974 | base64_encode($file->getContent()), IIndexDocument::ENCODED_BASE64 |
975 | 975 | ); |
976 | - } catch (NotPermittedException|LockedException $e) { |
|
976 | + } catch (NotPermittedException | LockedException $e) { |
|
977 | 977 | } |
978 | 978 | } |
979 | 979 | } |
@@ -988,15 +988,15 @@ discard block |
||
988 | 988 | private function readDrawioXmlValue(\SimpleXMLElement $element) { |
989 | 989 | $str = ''; |
990 | 990 | if ($element['value'] !== null && trim(strval($element['value'])) !== '') { |
991 | - $str = $str . ' ' . trim(strval($element['value'])); |
|
991 | + $str = $str.' '.trim(strval($element['value'])); |
|
992 | 992 | } |
993 | 993 | if ($element !== null && trim(strval($element)) !== '') { |
994 | - $str = $str . ' ' . trim(strval($element)); |
|
994 | + $str = $str.' '.trim(strval($element)); |
|
995 | 995 | } |
996 | 996 | |
997 | 997 | try { |
998 | 998 | foreach ($element->children() as $child) { |
999 | - $str = $str . ' ' . $this->readDrawioXmlValue($child); |
|
999 | + $str = $str.' '.$this->readDrawioXmlValue($child); |
|
1000 | 1000 | } |
1001 | 1001 | } finally { |
1002 | 1002 | } |
@@ -1032,7 +1032,7 @@ discard block |
||
1032 | 1032 | $document->setContent( |
1033 | 1033 | base64_encode($file->getContent()), IIndexDocument::ENCODED_BASE64 |
1034 | 1034 | ); |
1035 | - } catch (NotPermittedException|LockedException $e) { |
|
1035 | + } catch (NotPermittedException | LockedException $e) { |
|
1036 | 1036 | } |
1037 | 1037 | } |
1038 | 1038 | |
@@ -1068,7 +1068,7 @@ discard block |
||
1068 | 1068 | $document->setContent( |
1069 | 1069 | base64_encode($file->getContent()), IIndexDocument::ENCODED_BASE64 |
1070 | 1070 | ); |
1071 | - } catch (NotPermittedException|LockedException $e) { |
|
1071 | + } catch (NotPermittedException | LockedException $e) { |
|
1072 | 1072 | } |
1073 | 1073 | } |
1074 | 1074 | |
@@ -1249,7 +1249,7 @@ discard block |
||
1249 | 1249 | $path = ''; |
1250 | 1250 | } |
1251 | 1251 | |
1252 | - $result = (($entrySlash) ? '/' : '') . $path; |
|
1252 | + $result = (($entrySlash) ? '/' : '').$path; |
|
1253 | 1253 | $this->logger->debug( |
1254 | 1254 | 'getPathFromRoot', [ |
1255 | 1255 | 'path' => $path, |