@@ -236,7 +236,7 @@ |
||
236 | 236 | */ |
237 | 237 | public function setDocumentIndexOption(FilesDocument $document, string $option) { |
238 | 238 | $document->getIndex() |
239 | - ->addOption('_' . $option, (string)$this->getAppValue($option)); |
|
239 | + ->addOption('_'.$option, (string)$this->getAppValue($option)); |
|
240 | 240 | } |
241 | 241 | |
242 | 242 |
@@ -87,7 +87,7 @@ discard block |
||
87 | 87 | * @param FilesDocument $document |
88 | 88 | * @param Node $file |
89 | 89 | */ |
90 | - public function fileIndexing(FilesDocument &$document, Node $file) { |
|
90 | + public function fileIndexing(FilesDocument & $document, Node $file) { |
|
91 | 91 | $this->dispatch('Files_FullTextSearch.onFileIndexing', ['file' => $file, 'document' => &$document]); |
92 | 92 | } |
93 | 93 | |
@@ -95,7 +95,7 @@ discard block |
||
95 | 95 | /** |
96 | 96 | * @param ISearchRequest $request |
97 | 97 | */ |
98 | - public function searchRequest(ISearchRequest &$request) { |
|
98 | + public function searchRequest(ISearchRequest & $request) { |
|
99 | 99 | $this->dispatch('Files_FullTextSearch.onSearchRequest', ['request' => &$request]); |
100 | 100 | } |
101 | 101 | |
@@ -103,7 +103,7 @@ discard block |
||
103 | 103 | /** |
104 | 104 | * @param ISearchResult $result |
105 | 105 | */ |
106 | - public function searchResult(ISearchResult &$result) { |
|
106 | + public function searchResult(ISearchResult & $result) { |
|
107 | 107 | $this->dispatch('Files_FullTextSearch.onSearchResult', ['result' => &$result]); |
108 | 108 | } |
109 | 109 | |
@@ -111,7 +111,7 @@ discard block |
||
111 | 111 | /** |
112 | 112 | * @param IIndexDocument $document |
113 | 113 | */ |
114 | - public function indexComparing(IIndexDocument &$document) { |
|
114 | + public function indexComparing(IIndexDocument & $document) { |
|
115 | 115 | $this->dispatch('Files_FullTextSearch.onIndexComparing', ['document' => &$document]); |
116 | 116 | } |
117 | 117 |
@@ -191,7 +191,7 @@ |
||
191 | 191 | * |
192 | 192 | * @throws FileIsNotIndexableException |
193 | 193 | */ |
194 | - public function updateDocumentAccess(FilesDocument &$document, Node $file) { |
|
194 | + public function updateDocumentAccess(FilesDocument & $document, Node $file) { |
|
195 | 195 | if ($document->getSource() !== ConfigService::FILES_EXTERNAL) { |
196 | 196 | return; |
197 | 197 | } |
@@ -1047,17 +1047,17 @@ |
||
1047 | 1047 | $content = ''; |
1048 | 1048 | |
1049 | 1049 | foreach ($xml->diagram as $child) { |
1050 | - $deflated_content = (string)$child; |
|
1051 | - $base64decoded = base64_decode($deflated_content); |
|
1052 | - $urlencoded_content = gzinflate($base64decoded); |
|
1053 | - $urldecoded_content = urldecode($urlencoded_content); |
|
1050 | + $deflated_content = (string)$child; |
|
1051 | + $base64decoded = base64_decode($deflated_content); |
|
1052 | + $urlencoded_content = gzinflate($base64decoded); |
|
1053 | + $urldecoded_content = urldecode($urlencoded_content); |
|
1054 | 1054 | |
1055 | - // Remove image tag |
|
1056 | - $diagram_str = preg_replace('/style=\"shape=image[^"]*\"/', '', $urldecoded_content); |
|
1055 | + // Remove image tag |
|
1056 | + $diagram_str = preg_replace('/style=\"shape=image[^"]*\"/', '', $urldecoded_content); |
|
1057 | 1057 | |
1058 | - // Construct XML |
|
1059 | - $diagram_xml = simplexml_load_string($diagram_str); |
|
1060 | - $content = $content . ' ' . $this->readDrawioXmlValue($diagram_xml); |
|
1058 | + // Construct XML |
|
1059 | + $diagram_xml = simplexml_load_string($diagram_str); |
|
1060 | + $content = $content . ' ' . $this->readDrawioXmlValue($diagram_xml); |
|
1061 | 1061 | } |
1062 | 1062 | |
1063 | 1063 | } catch (\Throwable $t) { |
@@ -230,7 +230,7 @@ discard block |
||
230 | 230 | $files = $this->rootFolder->getUserFolder($userId) |
231 | 231 | ->get($indexOptions->getOption('path', '/')); |
232 | 232 | } catch (Throwable $e) { |
233 | - $this->log(2, 'Issue while retrieving rootFolder for ' . $userId); |
|
233 | + $this->log(2, 'Issue while retrieving rootFolder for '.$userId); |
|
234 | 234 | |
235 | 235 | return []; |
236 | 236 | } |
@@ -480,7 +480,7 @@ discard block |
||
480 | 480 | $tagIds = $this->systemTagObjectMapper->getTagIdsForObjects([$file->getId()], 'files'); |
481 | 481 | if (array_key_exists($file->getId(), $tagIds)) { |
482 | 482 | $tags = array_values( |
483 | - array_map(function (ISystemTag $tag): string { |
|
483 | + array_map(function(ISystemTag $tag): string { |
|
484 | 484 | return $tag->getName(); |
485 | 485 | }, $this->systemTagManager->getTagsByIds($tagIds[$file->getId()])) |
486 | 486 | ); |
@@ -611,8 +611,8 @@ discard block |
||
611 | 611 | $document->getIndex() |
612 | 612 | ->setStatus(IIndex::INDEX_IGNORE); |
613 | 613 | $this->miscService->log( |
614 | - 'Exception while generateDocument: ' . $e->getMessage() . ' (' . get_class($e) . ') at ' |
|
615 | - . $e->getFile() . ' line ' . $e->getLine() |
|
614 | + 'Exception while generateDocument: '.$e->getMessage().' ('.get_class($e).') at ' |
|
615 | + . $e->getFile().' line '.$e->getLine() |
|
616 | 616 | ); |
617 | 617 | } |
618 | 618 | } |
@@ -815,7 +815,7 @@ discard block |
||
815 | 815 | |
816 | 816 | $part = []; |
817 | 817 | foreach ($comments as $comment) { |
818 | - $part[] = '<' . $comment->getActorId() . '> ' . $comment->getMessage(); |
|
818 | + $part[] = '<'.$comment->getActorId().'> '.$comment->getMessage(); |
|
819 | 819 | } |
820 | 820 | |
821 | 821 | $document->addPart('comments', implode(" \n ", $part)); |
@@ -850,7 +850,7 @@ discard block |
||
850 | 850 | (!is_string($path)) ? $path = '' : $path; |
851 | 851 | } catch (Throwable $e) { |
852 | 852 | $this->miscService->log( |
853 | - 'Issue while getting information on documentId:' . $document->getId(), 0 |
|
853 | + 'Issue while getting information on documentId:'.$document->getId(), 0 |
|
854 | 854 | ); |
855 | 855 | } |
856 | 856 | } |
@@ -901,7 +901,7 @@ discard block |
||
901 | 901 | } |
902 | 902 | |
903 | 903 | // 20220219 Parse .drawio file |
904 | - if ($extension === 'drawio') { |
|
904 | + if ($extension === 'drawio') { |
|
905 | 905 | $parsed = self::MIMETYPE_TEXT; |
906 | 906 | throw new KnownFileMimeTypeException(); |
907 | 907 | } |
@@ -1048,7 +1048,7 @@ discard block |
||
1048 | 1048 | } |
1049 | 1049 | |
1050 | 1050 | // 20220219 Inflate drawio file |
1051 | - if ( $file->getExtension() === 'drawio') { |
|
1051 | + if ($file->getExtension() === 'drawio') { |
|
1052 | 1052 | $content = $file->getContent(); |
1053 | 1053 | |
1054 | 1054 | try { |
@@ -1068,7 +1068,7 @@ discard block |
||
1068 | 1068 | |
1069 | 1069 | // Construct XML |
1070 | 1070 | $diagram_xml = simplexml_load_string($diagram_str); |
1071 | - $content = $content . ' ' . $this->readDrawioXmlValue($diagram_xml); |
|
1071 | + $content = $content.' '.$this->readDrawioXmlValue($diagram_xml); |
|
1072 | 1072 | } |
1073 | 1073 | |
1074 | 1074 | } catch (\Throwable $t) { |
@@ -1100,16 +1100,16 @@ discard block |
||
1100 | 1100 | */ |
1101 | 1101 | private function readDrawioXmlValue(\SimpleXMLElement $element) { |
1102 | 1102 | $str = ''; |
1103 | - if( $element['value'] != null && trim(strval($element['value'])) !== '') { |
|
1104 | - $str = $str . " " . trim(strval($element['value'])); |
|
1103 | + if ($element['value'] != null && trim(strval($element['value'])) !== '') { |
|
1104 | + $str = $str." ".trim(strval($element['value'])); |
|
1105 | 1105 | } |
1106 | - if( $element != null && trim(strval($element)) !== '') { |
|
1107 | - $str = $str . " " . trim(strval($element)); |
|
1106 | + if ($element != null && trim(strval($element)) !== '') { |
|
1107 | + $str = $str." ".trim(strval($element)); |
|
1108 | 1108 | } |
1109 | 1109 | |
1110 | 1110 | try { |
1111 | 1111 | foreach ($element->children() as $child) { |
1112 | - $str = $str . " " . $this->readDrawioXmlValue($child); |
|
1112 | + $str = $str." ".$this->readDrawioXmlValue($child); |
|
1113 | 1113 | } |
1114 | 1114 | } finally { |
1115 | 1115 | } |
@@ -1363,7 +1363,7 @@ discard block |
||
1363 | 1363 | $path = ''; |
1364 | 1364 | } |
1365 | 1365 | |
1366 | - $result = (($entrySlash) ? '/' : '') . $path; |
|
1366 | + $result = (($entrySlash) ? '/' : '').$path; |
|
1367 | 1367 | $this->debug( |
1368 | 1368 | 'getPathFromRoot', [ |
1369 | 1369 | 'path' => $path, |
@@ -96,7 +96,7 @@ discard block |
||
96 | 96 | return $line; |
97 | 97 | } |
98 | 98 | |
99 | - return substr($line, 0, $length - 5) . ' (..)'; |
|
99 | + return substr($line, 0, $length - 5).' (..)'; |
|
100 | 100 | } |
101 | 101 | |
102 | 102 | /** |
@@ -134,7 +134,7 @@ discard block |
||
134 | 134 | protected function feedStringWithParams(string $line, array $params): string { |
135 | 135 | $ak = array_keys($params); |
136 | 136 | foreach ($ak as $k) { |
137 | - $line = str_replace('{' . $k . '}', (string)$params[$k], $line); |
|
137 | + $line = str_replace('{'.$k.'}', (string)$params[$k], $line); |
|
138 | 138 | } |
139 | 139 | |
140 | 140 | return $line; |
@@ -188,7 +188,7 @@ discard block |
||
188 | 188 | $s = ['B', 'KB', 'MB', 'GB', 'TB', 'PB']; |
189 | 189 | $e = floor(log($bytes, 1024)); |
190 | 190 | |
191 | - return round($bytes / pow(1024, $e), 2) . ' ' . $s[$e]; |
|
191 | + return round($bytes / pow(1024, $e), 2).' '.$s[$e]; |
|
192 | 192 | } |
193 | 193 | |
194 | 194 | |
@@ -211,8 +211,8 @@ discard block |
||
211 | 211 | $second = time(); |
212 | 212 | } |
213 | 213 | |
214 | - $f = new DateTime('@' . $first); |
|
215 | - $s = new DateTime('@' . $second); |
|
214 | + $f = new DateTime('@'.$first); |
|
215 | + $s = new DateTime('@'.$second); |
|
216 | 216 | $duration = $second - $first; |
217 | 217 | if ($short) { |
218 | 218 | $minutes = $this->get('minutes', $words, 'M'); |
@@ -220,16 +220,16 @@ discard block |
||
220 | 220 | $days = $this->get('days', $words, 'D'); |
221 | 221 | |
222 | 222 | if ($duration < 60) { |
223 | - return $f->diff($s)->format('<1' . $minutes); |
|
223 | + return $f->diff($s)->format('<1'.$minutes); |
|
224 | 224 | } |
225 | 225 | if ($duration < 3600) { |
226 | - return $f->diff($s)->format('%i' . $minutes); |
|
226 | + return $f->diff($s)->format('%i'.$minutes); |
|
227 | 227 | } |
228 | 228 | if ($duration < 86400) { |
229 | - return $f->diff($s)->format('%h' . $hours . ', %i' . $minutes); |
|
229 | + return $f->diff($s)->format('%h'.$hours.', %i'.$minutes); |
|
230 | 230 | } |
231 | 231 | |
232 | - return $f->diff($s)->format('%a' . $days . ', %h' . $hours . ', %i' . $minutes); |
|
232 | + return $f->diff($s)->format('%a'.$days.', %h'.$hours.', %i'.$minutes); |
|
233 | 233 | } |
234 | 234 | |
235 | 235 | $seconds = $this->get('seconds', $words, 'seconds'); |
@@ -237,22 +237,22 @@ discard block |
||
237 | 237 | $hours = $this->get('hours', $words, 'hours'); |
238 | 238 | $days = $this->get('days', $words, 'days'); |
239 | 239 | if ($duration < 60) { |
240 | - return $f->diff($s)->format('%s ' . $seconds); |
|
240 | + return $f->diff($s)->format('%s '.$seconds); |
|
241 | 241 | } |
242 | 242 | |
243 | 243 | if ($duration < 3600) { |
244 | - return $f->diff($s)->format('%i ' . $minutes . ' and %s ' . $seconds); |
|
244 | + return $f->diff($s)->format('%i '.$minutes.' and %s '.$seconds); |
|
245 | 245 | } |
246 | 246 | |
247 | 247 | if ($duration < 86400) { |
248 | - return $f->diff($s)->format('%h ' . $hours . ', %i ' . $minutes . ' and %s ' . $seconds); |
|
248 | + return $f->diff($s)->format('%h '.$hours.', %i '.$minutes.' and %s '.$seconds); |
|
249 | 249 | } |
250 | 250 | |
251 | 251 | return $f->diff($s)->format( |
252 | - '%a ' . $days . |
|
253 | - ', %h ' . $hours . |
|
254 | - ', %i ' . $minutes . |
|
255 | - ' and %s ' . $seconds |
|
252 | + '%a '.$days. |
|
253 | + ', %h '.$hours. |
|
254 | + ', %i '.$minutes. |
|
255 | + ' and %s '.$seconds |
|
256 | 256 | ); |
257 | 257 | } |
258 | 258 | } |
@@ -128,7 +128,7 @@ discard block |
||
128 | 128 | * @param array $serializable |
129 | 129 | */ |
130 | 130 | public function emergency(string $message, bool $trace = false, array $serializable = []): void { |
131 | - $this->log(self::$EMERGENCY, '[emergency] ' . $message, $trace, $serializable); |
|
131 | + $this->log(self::$EMERGENCY, '[emergency] '.$message, $trace, $serializable); |
|
132 | 132 | } |
133 | 133 | |
134 | 134 | /** |
@@ -137,7 +137,7 @@ discard block |
||
137 | 137 | * @param array $serializable |
138 | 138 | */ |
139 | 139 | public function alert(string $message, bool $trace = false, array $serializable = []): void { |
140 | - $this->log(self::$ALERT, '[alert] ' . $message, $trace, $serializable); |
|
140 | + $this->log(self::$ALERT, '[alert] '.$message, $trace, $serializable); |
|
141 | 141 | } |
142 | 142 | |
143 | 143 | /** |
@@ -146,7 +146,7 @@ discard block |
||
146 | 146 | * @param array $serializable |
147 | 147 | */ |
148 | 148 | public function warning(string $message, bool $trace = false, array $serializable = []): void { |
149 | - $this->log(self::$WARNING, '[warning] ' . $message, $trace, $serializable); |
|
149 | + $this->log(self::$WARNING, '[warning] '.$message, $trace, $serializable); |
|
150 | 150 | } |
151 | 151 | |
152 | 152 | /** |
@@ -155,7 +155,7 @@ discard block |
||
155 | 155 | * @param array $serializable |
156 | 156 | */ |
157 | 157 | public function notice(string $message, bool $trace = false, array $serializable = []): void { |
158 | - $this->log(self::$NOTICE, '[notice] ' . $message, $trace, $serializable); |
|
158 | + $this->log(self::$NOTICE, '[notice] '.$message, $trace, $serializable); |
|
159 | 159 | } |
160 | 160 | |
161 | 161 | /** |
@@ -163,7 +163,7 @@ discard block |
||
163 | 163 | * @param array $serializable |
164 | 164 | */ |
165 | 165 | public function debug(string $message, array $serializable = []): void { |
166 | - $message = '[debug] ' . $message; |
|
166 | + $message = '[debug] '.$message; |
|
167 | 167 | $debugLevel = (int)$this->appConfig('debug_level'); |
168 | 168 | $this->log($debugLevel, $message, ($this->appConfig('debug_trace') === '1'), $serializable); |
169 | 169 | } |
@@ -180,7 +180,7 @@ discard block |
||
180 | 180 | if ($trace) { |
181 | 181 | $opts['exception'] = new HintException($message, json_encode($serializable)); |
182 | 182 | } elseif (!empty($serializable)) { |
183 | - $message .= ' -- ' . json_encode($serializable); |
|
183 | + $message .= ' -- '.json_encode($serializable); |
|
184 | 184 | } |
185 | 185 | |
186 | 186 | $this->logger() |
@@ -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 | } |
@@ -215,7 +215,7 @@ discard block |
||
215 | 215 | */ |
216 | 216 | public function limitToCreation(int $delay = 0): self { |
217 | 217 | $date = new DateTime('now'); |
218 | - $date->sub(new DateInterval('PT' . $delay . 'M')); |
|
218 | + $date->sub(new DateInterval('PT'.$delay.'M')); |
|
219 | 219 | |
220 | 220 | $this->limitToDBFieldDateTime('creation', $date, true); |
221 | 221 | |
@@ -232,7 +232,7 @@ discard block |
||
232 | 232 | $expr = $this->expr(); |
233 | 233 | $pf = ($this->getType() === DBALQueryBuilder::SELECT) ? $this->getDefaultSelectAlias() |
234 | 234 | . '.' : ''; |
235 | - $field = $pf . $field; |
|
235 | + $field = $pf.$field; |
|
236 | 236 | |
237 | 237 | $orX = $expr->orX(); |
238 | 238 | $orX->add( |
@@ -262,8 +262,8 @@ discard block |
||
262 | 262 | } |
263 | 263 | |
264 | 264 | $expr = $this->expr(); |
265 | - $pf = ($this->getType() === DBALQueryBuilder::SELECT) ? $this->getDefaultSelectAlias() . '.' : ''; |
|
266 | - $field = $pf . $field; |
|
265 | + $pf = ($this->getType() === DBALQueryBuilder::SELECT) ? $this->getDefaultSelectAlias().'.' : ''; |
|
266 | + $field = $pf.$field; |
|
267 | 267 | |
268 | 268 | $orX = $expr->orX(); |
269 | 269 | $orX->add( |
@@ -281,8 +281,8 @@ discard block |
||
281 | 281 | public function searchInDBField(string $field, string $value): void { |
282 | 282 | $expr = $this->expr(); |
283 | 283 | |
284 | - $pf = ($this->getType() === DBALQueryBuilder::SELECT) ? $this->getDefaultSelectAlias() . '.' : ''; |
|
285 | - $field = $pf . $field; |
|
284 | + $pf = ($this->getType() === DBALQueryBuilder::SELECT) ? $this->getDefaultSelectAlias().'.' : ''; |
|
285 | + $field = $pf.$field; |
|
286 | 286 | |
287 | 287 | $this->andWhere($expr->iLike($field, $this->createNamedParameter($value))); |
288 | 288 | } |
@@ -404,7 +404,7 @@ discard block |
||
404 | 404 | */ |
405 | 405 | public function exprLike(string $field, string $value, string $alias = '', bool $cs = true): string { |
406 | 406 | if ($this->getType() === DBALQueryBuilder::SELECT) { |
407 | - $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias) . '.' . $field; |
|
407 | + $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias).'.'.$field; |
|
408 | 408 | } |
409 | 409 | |
410 | 410 | $expr = $this->expr(); |
@@ -426,7 +426,7 @@ discard block |
||
426 | 426 | */ |
427 | 427 | public function exprLimit(string $field, string $value, string $alias = '', bool $cs = true): string { |
428 | 428 | if ($this->getType() === DBALQueryBuilder::SELECT) { |
429 | - $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias) . '.' . $field; |
|
429 | + $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias).'.'.$field; |
|
430 | 430 | } |
431 | 431 | |
432 | 432 | $expr = $this->expr(); |
@@ -452,7 +452,7 @@ discard block |
||
452 | 452 | */ |
453 | 453 | public function exprLimitInt(string $field, int $value, string $alias = ''): string { |
454 | 454 | if ($this->getType() === DBALQueryBuilder::SELECT) { |
455 | - $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias) . '.' . $field; |
|
455 | + $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias).'.'.$field; |
|
456 | 456 | } |
457 | 457 | |
458 | 458 | $expr = $this->expr(); |
@@ -470,7 +470,7 @@ discard block |
||
470 | 470 | */ |
471 | 471 | public function exprLimitBool(string $field, bool $value, string $alias = ''): string { |
472 | 472 | if ($this->getType() === DBALQueryBuilder::SELECT) { |
473 | - $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias) . '.' . $field; |
|
473 | + $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias).'.'.$field; |
|
474 | 474 | } |
475 | 475 | |
476 | 476 | $expr = $this->expr(); |
@@ -491,7 +491,7 @@ discard block |
||
491 | 491 | string $alias = '' |
492 | 492 | ): ICompositeExpression { |
493 | 493 | if ($this->getType() === DBALQueryBuilder::SELECT) { |
494 | - $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias) . '.' . $field; |
|
494 | + $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias).'.'.$field; |
|
495 | 495 | } |
496 | 496 | |
497 | 497 | $expr = $this->expr(); |
@@ -517,7 +517,7 @@ discard block |
||
517 | 517 | string $alias = '' |
518 | 518 | ): ICompositeExpression { |
519 | 519 | if ($this->getType() === DBALQueryBuilder::SELECT) { |
520 | - $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias) . '.' . $field; |
|
520 | + $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias).'.'.$field; |
|
521 | 521 | } |
522 | 522 | |
523 | 523 | $expr = $this->expr(); |
@@ -546,7 +546,7 @@ discard block |
||
546 | 546 | bool $cs = true |
547 | 547 | ): ICompositeExpression { |
548 | 548 | if ($this->getType() === DBALQueryBuilder::SELECT) { |
549 | - $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias) . '.' . $field; |
|
549 | + $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias).'.'.$field; |
|
550 | 550 | } |
551 | 551 | |
552 | 552 | $andX = $this->expr()->andX(); |
@@ -571,7 +571,7 @@ discard block |
||
571 | 571 | */ |
572 | 572 | public function exprLimitInArray(string $field, array $values, string $alias = ''): string { |
573 | 573 | if ($this->getType() === DBALQueryBuilder::SELECT) { |
574 | - $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias) . '.' . $field; |
|
574 | + $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias).'.'.$field; |
|
575 | 575 | } |
576 | 576 | |
577 | 577 | $expr = $this->expr(); |
@@ -589,7 +589,7 @@ discard block |
||
589 | 589 | */ |
590 | 590 | public function exprLimitBitwise(string $field, int $flag, string $alias = ''): string { |
591 | 591 | if ($this->getType() === DBALQueryBuilder::SELECT) { |
592 | - $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias) . '.' . $field; |
|
592 | + $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias).'.'.$field; |
|
593 | 593 | } |
594 | 594 | |
595 | 595 | $expr = $this->expr(); |
@@ -611,7 +611,7 @@ discard block |
||
611 | 611 | */ |
612 | 612 | public function exprLt(string $field, int $value, bool $lte = false, string $alias = ''): string { |
613 | 613 | if ($this->getType() === DBALQueryBuilder::SELECT) { |
614 | - $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias) . '.' . $field; |
|
614 | + $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias).'.'.$field; |
|
615 | 615 | } |
616 | 616 | |
617 | 617 | $expr = $this->expr(); |
@@ -633,7 +633,7 @@ discard block |
||
633 | 633 | */ |
634 | 634 | public function exprGt(string $field, int $value, bool $gte = false, string $alias = ''): string { |
635 | 635 | if ($this->getType() === DBALQueryBuilder::SELECT) { |
636 | - $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias) . '.' . $field; |
|
636 | + $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias).'.'.$field; |
|
637 | 637 | } |
638 | 638 | |
639 | 639 | $expr = $this->expr(); |
@@ -742,7 +742,7 @@ discard block |
||
742 | 742 | */ |
743 | 743 | public function exprUnlike(string $field, string $value, string $alias = '', bool $cs = true): string { |
744 | 744 | if ($this->getType() === DBALQueryBuilder::SELECT) { |
745 | - $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias) . '.' . $field; |
|
745 | + $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias).'.'.$field; |
|
746 | 746 | } |
747 | 747 | |
748 | 748 | $expr = $this->expr(); |
@@ -766,7 +766,7 @@ discard block |
||
766 | 766 | */ |
767 | 767 | public function exprFilter(string $field, string $value, string $alias = '', bool $cs = true): string { |
768 | 768 | if ($this->getType() === DBALQueryBuilder::SELECT) { |
769 | - $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias) . '.' . $field; |
|
769 | + $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias).'.'.$field; |
|
770 | 770 | } |
771 | 771 | |
772 | 772 | $expr = $this->expr(); |
@@ -792,7 +792,7 @@ discard block |
||
792 | 792 | */ |
793 | 793 | public function exprFilterInt(string $field, int $value, string $alias = ''): string { |
794 | 794 | if ($this->getType() === DBALQueryBuilder::SELECT) { |
795 | - $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias) . '.' . $field; |
|
795 | + $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias).'.'.$field; |
|
796 | 796 | } |
797 | 797 | |
798 | 798 | $expr = $this->expr(); |
@@ -810,7 +810,7 @@ discard block |
||
810 | 810 | */ |
811 | 811 | public function exprFilterBool(string $field, bool $value, string $alias = ''): string { |
812 | 812 | if ($this->getType() === DBALQueryBuilder::SELECT) { |
813 | - $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias) . '.' . $field; |
|
813 | + $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias).'.'.$field; |
|
814 | 814 | } |
815 | 815 | |
816 | 816 | $expr = $this->expr(); |
@@ -831,7 +831,7 @@ discard block |
||
831 | 831 | string $alias = '' |
832 | 832 | ): ICompositeExpression { |
833 | 833 | if ($this->getType() === DBALQueryBuilder::SELECT) { |
834 | - $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias) . '.' . $field; |
|
834 | + $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias).'.'.$field; |
|
835 | 835 | } |
836 | 836 | |
837 | 837 | $expr = $this->expr(); |
@@ -857,7 +857,7 @@ discard block |
||
857 | 857 | string $alias = '' |
858 | 858 | ): ICompositeExpression { |
859 | 859 | if ($this->getType() === DBALQueryBuilder::SELECT) { |
860 | - $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias) . '.' . $field; |
|
860 | + $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias).'.'.$field; |
|
861 | 861 | } |
862 | 862 | |
863 | 863 | $expr = $this->expr(); |
@@ -886,7 +886,7 @@ discard block |
||
886 | 886 | bool $cs = true |
887 | 887 | ): ICompositeExpression { |
888 | 888 | if ($this->getType() === DBALQueryBuilder::SELECT) { |
889 | - $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias) . '.' . $field; |
|
889 | + $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias).'.'.$field; |
|
890 | 890 | } |
891 | 891 | |
892 | 892 | $orX = $this->expr()->orX(); |
@@ -911,7 +911,7 @@ discard block |
||
911 | 911 | */ |
912 | 912 | public function exprFilterInArray(string $field, array $values, string $alias = ''): string { |
913 | 913 | if ($this->getType() === DBALQueryBuilder::SELECT) { |
914 | - $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias) . '.' . $field; |
|
914 | + $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias).'.'.$field; |
|
915 | 915 | } |
916 | 916 | |
917 | 917 | $expr = $this->expr(); |
@@ -929,7 +929,7 @@ discard block |
||
929 | 929 | */ |
930 | 930 | public function exprFilterBitwise(string $field, int $flag, string $alias = ''): string { |
931 | 931 | if ($this->getType() === DBALQueryBuilder::SELECT) { |
932 | - $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias) . '.' . $field; |
|
932 | + $field = (($alias === '') ? $this->getDefaultSelectAlias() : $alias).'.'.$field; |
|
933 | 933 | } |
934 | 934 | |
935 | 935 | $expr = $this->expr(); |
@@ -1090,12 +1090,12 @@ discard block |
||
1090 | 1090 | string $alias = '' |
1091 | 1091 | ): self { |
1092 | 1092 | $selectFields = array_map( |
1093 | - function (string $item) use ($alias) { |
|
1093 | + function(string $item) use ($alias) { |
|
1094 | 1094 | if ($alias === '') { |
1095 | 1095 | return $item; |
1096 | 1096 | } |
1097 | 1097 | |
1098 | - return $alias . '.' . $item; |
|
1098 | + return $alias.'.'.$item; |
|
1099 | 1099 | }, $fields |
1100 | 1100 | ); |
1101 | 1101 | |
@@ -1121,13 +1121,13 @@ discard block |
||
1121 | 1121 | string $prefix, |
1122 | 1122 | array $default = [] |
1123 | 1123 | ): self { |
1124 | - $prefix = trim($prefix) . '_'; |
|
1124 | + $prefix = trim($prefix).'_'; |
|
1125 | 1125 | foreach ($default as $k => $v) { |
1126 | - $this->addDefaultValue($prefix . $k, (string)$v); |
|
1126 | + $this->addDefaultValue($prefix.$k, (string)$v); |
|
1127 | 1127 | } |
1128 | 1128 | |
1129 | 1129 | foreach ($fields as $field) { |
1130 | - $this->selectAlias($alias . '.' . $field, $prefix . $field); |
|
1130 | + $this->selectAlias($alias.'.'.$field, $prefix.$field); |
|
1131 | 1131 | } |
1132 | 1132 | |
1133 | 1133 | return $this; |
@@ -159,7 +159,7 @@ discard block |
||
159 | 159 | * @param FilesDocument $document |
160 | 160 | * @param Node $file |
161 | 161 | */ |
162 | - public function updateDocumentAccess(FilesDocument &$document, Node $file) { |
|
162 | + public function updateDocumentAccess(FilesDocument & $document, Node $file) { |
|
163 | 163 | if ($document->getSource() !== ConfigService::FILES_GROUP_FOLDERS) { |
164 | 164 | return; |
165 | 165 | } |
@@ -222,7 +222,7 @@ discard block |
||
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 | } |