@@ -222,7 +222,7 @@ |
||
222 | 222 | foreach ($mounts as $path => $mount) { |
223 | 223 | $mountPoint = new MountPoint(); |
224 | 224 | $mountPoint->setId($this->getInt('id', $mount, -1)) |
225 | - ->setPath('/' . $userId . '/files/' . $mount['mount_point']) |
|
225 | + ->setPath('/'.$userId.'/files/'.$mount['mount_point']) |
|
226 | 226 | ->setGroups(array_keys($mount['groups'])); |
227 | 227 | $mountPoints[] = $mountPoint; |
228 | 228 | } |
@@ -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) { |
@@ -117,7 +117,7 @@ discard block |
||
117 | 117 | } catch (NotFoundException $e) { |
118 | 118 | return []; |
119 | 119 | } catch (Throwable $e) { |
120 | - $this->logger->warning('Issue while retrieving rootFolder for ' . $userId, ['exception' => $e]); |
|
120 | + $this->logger->warning('Issue while retrieving rootFolder for '.$userId, ['exception' => $e]); |
|
121 | 121 | return []; |
122 | 122 | } |
123 | 123 | |
@@ -366,7 +366,7 @@ discard block |
||
366 | 366 | $tagIds = $this->systemTagObjectMapper->getTagIdsForObjects([$file->getId()], 'files'); |
367 | 367 | if (array_key_exists($file->getId(), $tagIds)) { |
368 | 368 | $tags = array_values( |
369 | - array_map(function (ISystemTag $tag): string { |
|
369 | + array_map(function(ISystemTag $tag): string { |
|
370 | 370 | return $tag->getName(); |
371 | 371 | }, $this->systemTagManager->getTagsByIds($tagIds[$file->getId()])) |
372 | 372 | ); |
@@ -384,7 +384,7 @@ discard block |
||
384 | 384 | ] |
385 | 385 | ); |
386 | 386 | } else { |
387 | - $this->logger->warning('stat() on File #' . $file->getId() . ' is not an array: ' . json_encode($stat)); |
|
387 | + $this->logger->warning('stat() on File #'.$file->getId().' is not an array: '.json_encode($stat)); |
|
388 | 388 | } |
389 | 389 | |
390 | 390 | return $document; |
@@ -440,7 +440,7 @@ discard block |
||
440 | 440 | } |
441 | 441 | |
442 | 442 | if ($this->userManager->get($userId) === null) { |
443 | - throw new NoUserException('User does not exist: ' . $userId); |
|
443 | + throw new NoUserException('User does not exist: '.$userId); |
|
444 | 444 | } |
445 | 445 | |
446 | 446 | $files = $this->rootFolder->getUserFolder($userId) |
@@ -707,7 +707,7 @@ discard block |
||
707 | 707 | |
708 | 708 | $part = []; |
709 | 709 | foreach ($comments as $comment) { |
710 | - $part[] = '<' . $comment->getActorId() . '> ' . $comment->getMessage(); |
|
710 | + $part[] = '<'.$comment->getActorId().'> '.$comment->getMessage(); |
|
711 | 711 | } |
712 | 712 | |
713 | 713 | $document->addPart('comments', implode(" \n ", $part)); |
@@ -741,7 +741,7 @@ discard block |
||
741 | 741 | $shareNames[$this->secureUsername($username)] = |
742 | 742 | (!is_string($path)) ? $path = '' : $path; |
743 | 743 | } catch (Throwable $e) { |
744 | - $this->logger->debug('Issue while getting information on documentId:' . $document->getId(), ['exception' => $e]); |
|
744 | + $this->logger->debug('Issue while getting information on documentId:'.$document->getId(), ['exception' => $e]); |
|
745 | 745 | } |
746 | 746 | } |
747 | 747 | |
@@ -958,7 +958,7 @@ discard block |
||
958 | 958 | |
959 | 959 | // Construct XML |
960 | 960 | $diagram_xml = simplexml_load_string($diagram_str); |
961 | - $content = $content . ' ' . $this->readDrawioXmlValue($diagram_xml); |
|
961 | + $content = $content.' '.$this->readDrawioXmlValue($diagram_xml); |
|
962 | 962 | } |
963 | 963 | } catch (\Throwable $t) { |
964 | 964 | } |
@@ -990,15 +990,15 @@ discard block |
||
990 | 990 | private function readDrawioXmlValue(\SimpleXMLElement $element) { |
991 | 991 | $str = ''; |
992 | 992 | if ($element['value'] !== null && trim(strval($element['value'])) !== '') { |
993 | - $str = $str . " " . trim(strval($element['value'])); |
|
993 | + $str = $str." ".trim(strval($element['value'])); |
|
994 | 994 | } |
995 | 995 | if ($element !== null && trim(strval($element)) !== '') { |
996 | - $str = $str . " " . trim(strval($element)); |
|
996 | + $str = $str." ".trim(strval($element)); |
|
997 | 997 | } |
998 | 998 | |
999 | 999 | try { |
1000 | 1000 | foreach ($element->children() as $child) { |
1001 | - $str = $str . " " . $this->readDrawioXmlValue($child); |
|
1001 | + $str = $str." ".$this->readDrawioXmlValue($child); |
|
1002 | 1002 | } |
1003 | 1003 | } finally { |
1004 | 1004 | } |
@@ -1251,7 +1251,7 @@ discard block |
||
1251 | 1251 | $path = ''; |
1252 | 1252 | } |
1253 | 1253 | |
1254 | - $result = (($entrySlash) ? '/' : '') . $path; |
|
1254 | + $result = (($entrySlash) ? '/' : '').$path; |
|
1255 | 1255 | $this->logger->debug( |
1256 | 1256 | 'getPathFromRoot', [ |
1257 | 1257 | 'path' => $path, |
@@ -40,8 +40,8 @@ discard block |
||
40 | 40 | } |
41 | 41 | |
42 | 42 | public function setConfig(array $save): void { |
43 | - foreach(array_keys($save) as $k) { |
|
44 | - switch($k) { |
|
43 | + foreach (array_keys($save) as $k) { |
|
44 | + switch ($k) { |
|
45 | 45 | case ConfigLexicon::FILES_EXTERNAL: |
46 | 46 | case ConfigLexicon::FILES_SIZE: |
47 | 47 | case ConfigLexicon::FILES_CHUNK_SIZE: |
@@ -61,7 +61,7 @@ discard block |
||
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 | /** |
@@ -124,7 +124,7 @@ discard block |
||
124 | 124 | ] as $k |
125 | 125 | ) { |
126 | 126 | if (is_string($data[$k] ?? false)) { |
127 | - $data[$k] = (int) $data[$k]; |
|
127 | + $data[$k] = (int)$data[$k]; |
|
128 | 128 | } |
129 | 129 | } |
130 | 130 |
@@ -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 | } |