@@ -129,7 +129,7 @@ discard block |
||
| 129 | 129 | * |
| 130 | 130 | * @param string $userId |
| 131 | 131 | * |
| 132 | - * @return IndexDocument[] |
|
| 132 | + * @return FilesDocument[] |
|
| 133 | 133 | * @throws InterruptException |
| 134 | 134 | * @throws TickDoesNotExistException |
| 135 | 135 | * @throws InvalidPathException |
@@ -148,7 +148,7 @@ discard block |
||
| 148 | 148 | * |
| 149 | 149 | * @param IndexDocument[] $chunk |
| 150 | 150 | * |
| 151 | - * @return IndexDocument[] |
|
| 151 | + * @return FilesDocument[] |
|
| 152 | 152 | */ |
| 153 | 153 | public function fillIndexDocuments($chunk) { |
| 154 | 154 | |
@@ -162,7 +162,7 @@ discard block |
||
| 162 | 162 | /** |
| 163 | 163 | * @param Index $index |
| 164 | 164 | * |
| 165 | - * @return IndexDocument|null |
|
| 165 | + * @return FilesDocument|null |
|
| 166 | 166 | * @throws InvalidPathException |
| 167 | 167 | * @throws NotFoundException |
| 168 | 168 | * @throws NotPermittedException |
@@ -78,8 +78,8 @@ |
||
| 78 | 78 | */ |
| 79 | 79 | private function limitToDBField(IQueryBuilder &$qb, $field, $value) { |
| 80 | 80 | $expr = $qb->expr(); |
| 81 | - $pf = ($qb->getType() === QueryBuilder::SELECT) ? $this->defaultSelectAlias . '.' : ''; |
|
| 82 | - $qb->andWhere($expr->eq($pf . $field, $qb->createNamedParameter($value))); |
|
| 81 | + $pf = ($qb->getType() === QueryBuilder::SELECT) ? $this->defaultSelectAlias.'.' : ''; |
|
| 82 | + $qb->andWhere($expr->eq($pf.$field, $qb->createNamedParameter($value))); |
|
| 83 | 83 | } |
| 84 | 84 | |
| 85 | 85 | |
@@ -231,7 +231,7 @@ |
||
| 231 | 231 | |
| 232 | 232 | |
| 233 | 233 | /** |
| 234 | - * @param $userId |
|
| 234 | + * @param string $userId |
|
| 235 | 235 | * |
| 236 | 236 | * @return MountPoint[] |
| 237 | 237 | */ |
@@ -211,7 +211,7 @@ |
||
| 211 | 211 | foreach ($mounts as $path => $mount) { |
| 212 | 212 | $mountPoint = new MountPoint(); |
| 213 | 213 | $mountPoint->setId($mount['id']) |
| 214 | - ->setPath('/' . $userId . '/files/' . $mount['mount_point']) |
|
| 214 | + ->setPath('/'.$userId.'/files/'.$mount['mount_point']) |
|
| 215 | 215 | ->setGroups(array_keys($mount['groups'])); |
| 216 | 216 | $mountPoints[] = $mountPoint; |
| 217 | 217 | } |
@@ -238,7 +238,7 @@ |
||
| 238 | 238 | */ |
| 239 | 239 | public function setDocumentIndexOption(FilesDocument $document, $option) { |
| 240 | 240 | $document->getIndex() |
| 241 | - ->addOption('_' . $option, $this->getAppValue($option)); |
|
| 241 | + ->addOption('_'.$option, $this->getAppValue($option)); |
|
| 242 | 242 | } |
| 243 | 243 | |
| 244 | 244 | |
@@ -272,7 +272,7 @@ discard block |
||
| 272 | 272 | |
| 273 | 273 | /** |
| 274 | 274 | * @param FilesDocument $document |
| 275 | - * @param $dir |
|
| 275 | + * @param string $dir |
|
| 276 | 276 | * @param $filename |
| 277 | 277 | */ |
| 278 | 278 | private function setDocumentLinkFile(FilesDocument $document, $dir, $filename) { |
@@ -289,7 +289,7 @@ discard block |
||
| 289 | 289 | |
| 290 | 290 | /** |
| 291 | 291 | * @param FilesDocument $document |
| 292 | - * @param $dir |
|
| 292 | + * @param string $dir |
|
| 293 | 293 | */ |
| 294 | 294 | private function setDocumentLinkDir(FilesDocument $document, $dir) { |
| 295 | 295 | if ($document->getInfo('type') !== 'dir') { |
@@ -89,10 +89,10 @@ discard block |
||
| 89 | 89 | */ |
| 90 | 90 | private function searchQueryShareNames(SearchRequest $request) { |
| 91 | 91 | $username = MiscService::secureUsername($request->getAuthor()); |
| 92 | - $request->addField('share_names.' . $username); |
|
| 92 | + $request->addField('share_names.'.$username); |
|
| 93 | 93 | |
| 94 | 94 | $request->addWildcardField('title'); |
| 95 | - $request->addWildcardField('share_names.' . $username); |
|
| 95 | + $request->addWildcardField('share_names.'.$username); |
|
| 96 | 96 | } |
| 97 | 97 | |
| 98 | 98 | |
@@ -110,8 +110,8 @@ discard block |
||
| 110 | 110 | $currentDir = MiscService::noBeginSlash(MiscService::endSlash($currentDir)); |
| 111 | 111 | $request->addRegexFilters( |
| 112 | 112 | [ |
| 113 | - ['share_names.' . $username => $currentDir . '*'], |
|
| 114 | - ['title' => $currentDir . '*'] |
|
| 113 | + ['share_names.'.$username => $currentDir.'*'], |
|
| 114 | + ['title' => $currentDir.'*'] |
|
| 115 | 115 | ] |
| 116 | 116 | ); |
| 117 | 117 | } |
@@ -129,8 +129,8 @@ discard block |
||
| 129 | 129 | $username = MiscService::secureUsername($request->getAuthor()); |
| 130 | 130 | $request->addRegexFilters( |
| 131 | 131 | [ |
| 132 | - ['share_names.' . $username => '.*\.' . $extension], |
|
| 133 | - ['title' => '.*\.' . $extension] |
|
| 132 | + ['share_names.'.$username => '.*\.'.$extension], |
|
| 133 | + ['title' => '.*\.'.$extension] |
|
| 134 | 134 | ] |
| 135 | 135 | ); |
| 136 | 136 | } |
@@ -168,7 +168,7 @@ discard block |
||
| 168 | 168 | |
| 169 | 169 | if (in_array('filename', $in)) { |
| 170 | 170 | $username = MiscService::secureUsername($request->getAuthor()); |
| 171 | - $request->limitToField('share_names.' . $username); |
|
| 171 | + $request->limitToField('share_names.'.$username); |
|
| 172 | 172 | $request->limitToField('title'); |
| 173 | 173 | } |
| 174 | 174 | |
@@ -331,7 +331,7 @@ discard block |
||
| 331 | 331 | private function getWebdavId($fileId) { |
| 332 | 332 | $instanceId = $this->configService->getSystemValue('instanceid'); |
| 333 | 333 | |
| 334 | - return sprintf("%08s", $fileId) . $instanceId; |
|
| 334 | + return sprintf("%08s", $fileId).$instanceId; |
|
| 335 | 335 | } |
| 336 | 336 | |
| 337 | 337 | |
@@ -381,7 +381,7 @@ discard block |
||
| 381 | 381 | // TODO - update $document with a error status instead of just ignore ! |
| 382 | 382 | $document->getIndex() |
| 383 | 383 | ->setStatus(Index::INDEX_IGNORE); |
| 384 | - echo 'Exception: ' . json_encode($e->getTrace()) . ' - ' . $e->getMessage() |
|
| 384 | + echo 'Exception: '.json_encode($e->getTrace()).' - '.$e->getMessage() |
|
| 385 | 385 | . "\n"; |
| 386 | 386 | } |
| 387 | 387 | |
@@ -594,7 +594,7 @@ discard block |
||
| 594 | 594 | |
| 595 | 595 | } catch (Exception $e) { |
| 596 | 596 | $this->miscService->log( |
| 597 | - 'Issue while getting information on documentId:' . $document->getId(), 0 |
|
| 597 | + 'Issue while getting information on documentId:'.$document->getId(), 0 |
|
| 598 | 598 | ); |
| 599 | 599 | } |
| 600 | 600 | } |