@@ -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') { |
@@ -86,10 +86,10 @@ discard block |
||
| 86 | 86 | */ |
| 87 | 87 | private function searchQueryShareNames(SearchRequest $request) { |
| 88 | 88 | $username = MiscService::secureUsername($request->getAuthor()); |
| 89 | - $request->addField('share_names.' . $username); |
|
| 89 | + $request->addField('share_names.'.$username); |
|
| 90 | 90 | |
| 91 | 91 | $request->addWildcardField('title'); |
| 92 | - $request->addWildcardField('share_names.' . $username); |
|
| 92 | + $request->addWildcardField('share_names.'.$username); |
|
| 93 | 93 | } |
| 94 | 94 | |
| 95 | 95 | |
@@ -107,8 +107,8 @@ discard block |
||
| 107 | 107 | $currentDir = MiscService::noBeginSlash(MiscService::endSlash($currentDir)); |
| 108 | 108 | $request->addRegexFilters( |
| 109 | 109 | [ |
| 110 | - ['share_names.' . $username => $currentDir . '.*'], |
|
| 111 | - ['title' => $currentDir . '.*'] |
|
| 110 | + ['share_names.'.$username => $currentDir.'.*'], |
|
| 111 | + ['title' => $currentDir.'.*'] |
|
| 112 | 112 | ] |
| 113 | 113 | ); |
| 114 | 114 | } |
@@ -126,8 +126,8 @@ discard block |
||
| 126 | 126 | $username = MiscService::secureUsername($request->getAuthor()); |
| 127 | 127 | $request->addRegexFilters( |
| 128 | 128 | [ |
| 129 | - ['share_names.' . $username => '.*\.' . $extension], |
|
| 130 | - ['title' => '.*\.' . $extension] |
|
| 129 | + ['share_names.'.$username => '.*\.'.$extension], |
|
| 130 | + ['title' => '.*\.'.$extension] |
|
| 131 | 131 | ] |
| 132 | 132 | ); |
| 133 | 133 | } |
@@ -165,7 +165,7 @@ discard block |
||
| 165 | 165 | |
| 166 | 166 | if (in_array('filename', $in)) { |
| 167 | 167 | $username = MiscService::secureUsername($request->getAuthor()); |
| 168 | - $request->limitToField('share_names.' . $username); |
|
| 168 | + $request->limitToField('share_names.'.$username); |
|
| 169 | 169 | $request->limitToField('title'); |
| 170 | 170 | } |
| 171 | 171 | |
@@ -328,7 +328,7 @@ discard block |
||
| 328 | 328 | private function getWebdavId($fileId) { |
| 329 | 329 | $instanceId = $this->configService->getSystemValue('instanceid'); |
| 330 | 330 | |
| 331 | - return sprintf("%08s", $fileId) . $instanceId; |
|
| 331 | + return sprintf("%08s", $fileId).$instanceId; |
|
| 332 | 332 | } |
| 333 | 333 | |
| 334 | 334 | |
@@ -373,7 +373,7 @@ discard block |
||
| 373 | 373 | // TODO - update $document with a error status instead of just ignore ! |
| 374 | 374 | $document->getIndex() |
| 375 | 375 | ->setStatus(Index::INDEX_IGNORE); |
| 376 | - echo 'Exception: ' . json_encode($e->getTrace()) . ' - ' . $e->getMessage() |
|
| 376 | + echo 'Exception: '.json_encode($e->getTrace()).' - '.$e->getMessage() |
|
| 377 | 377 | . "\n"; |
| 378 | 378 | } |
| 379 | 379 | } |
@@ -577,7 +577,7 @@ discard block |
||
| 577 | 577 | |
| 578 | 578 | } catch (Exception $e) { |
| 579 | 579 | $this->miscService->log( |
| 580 | - 'Issue while getting information on documentId:' . $document->getId(), 0 |
|
| 580 | + 'Issue while getting information on documentId:'.$document->getId(), 0 |
|
| 581 | 581 | ); |
| 582 | 582 | } |
| 583 | 583 | } |
@@ -797,7 +797,7 @@ |
||
| 797 | 797 | |
| 798 | 798 | |
| 799 | 799 | /** |
| 800 | - * @param $action |
|
| 800 | + * @param string $action |
|
| 801 | 801 | * @param bool $force |
| 802 | 802 | * |
| 803 | 803 | * @throws Exception |
@@ -231,7 +231,7 @@ |
||
| 231 | 231 | * |
| 232 | 232 | * @param string $userId |
| 233 | 233 | * |
| 234 | - * @return IndexDocument[] |
|
| 234 | + * @return FilesDocument[] |
|
| 235 | 235 | * @throws InvalidPathException |
| 236 | 236 | * @throws NotFoundException |
| 237 | 237 | */ |