@@ -184,7 +184,7 @@ |
||
| 184 | 184 | try { |
| 185 | 185 | $rights->setCircles(Circles::joinedCircleIds($user->getUID())); |
| 186 | 186 | } catch (Exception $e) { |
| 187 | - $this->miscService->log('Circles is set as enabled but: ' . $e->getMessage()); |
|
| 187 | + $this->miscService->log('Circles is set as enabled but: '.$e->getMessage()); |
|
| 188 | 188 | } |
| 189 | 189 | } |
| 190 | 190 | |
@@ -182,7 +182,7 @@ |
||
| 182 | 182 | } |
| 183 | 183 | } |
| 184 | 184 | |
| 185 | - $this->display->setFormat(implode("\n", $format) . "\n"); |
|
| 185 | + $this->display->setFormat(implode("\n", $format)."\n"); |
|
| 186 | 186 | $this->refreshInfo(); |
| 187 | 187 | $this->display->start(); |
| 188 | 188 | } |
@@ -85,7 +85,7 @@ |
||
| 85 | 85 | |
| 86 | 86 | /** |
| 87 | 87 | * @param string $panelId |
| 88 | - * @param array $lines |
|
| 88 | + * @param string[] $lines |
|
| 89 | 89 | */ |
| 90 | 90 | public function createPanel(string $panelId, array $lines) { |
| 91 | 91 | if (!is_array($lines)) { |
@@ -631,7 +631,7 @@ |
||
| 631 | 631 | } |
| 632 | 632 | |
| 633 | 633 | /** |
| 634 | - * @param array $filters |
|
| 634 | + * @param string[] $filters |
|
| 635 | 635 | * |
| 636 | 636 | * @return ISearchRequest |
| 637 | 637 | */ |
@@ -169,7 +169,7 @@ discard block |
||
| 169 | 169 | * @return ISearchRequest |
| 170 | 170 | */ |
| 171 | 171 | public function addSearch(string $search): ISearchRequest { |
| 172 | - $this->search .= ' ' . $search; |
|
| 172 | + $this->search .= ' '.$search; |
|
| 173 | 173 | |
| 174 | 174 | return $this; |
| 175 | 175 | } |
@@ -211,7 +211,7 @@ discard block |
||
| 211 | 211 | |
| 212 | 212 | $options = ['is', 'show']; |
| 213 | 213 | if (in_array($kw, $options)) { |
| 214 | - $this->addOption($kw . '_' . $value, '1'); |
|
| 214 | + $this->addOption($kw.'_'.$value, '1'); |
|
| 215 | 215 | |
| 216 | 216 | return true; |
| 217 | 217 | } |
@@ -226,7 +226,7 @@ discard block |
||
| 226 | 226 | $valuedSubOptions = ['and']; |
| 227 | 227 | if (in_array($kw, $valuedSubOptions)) { |
| 228 | 228 | list($key, $value) = explode(':', $value, 2); |
| 229 | - $this->addMultipleOption($kw . ':' . $key, $value); |
|
| 229 | + $this->addMultipleOption($kw.':'.$key, $value); |
|
| 230 | 230 | |
| 231 | 231 | return true; |
| 232 | 232 | } |
@@ -538,7 +538,7 @@ discard block |
||
| 538 | 538 | foreach ($ak as $source) { |
| 539 | 539 | $tags = $this->subTags[$source]; |
| 540 | 540 | foreach ($tags as $tag) { |
| 541 | - $subTags[] = $source . '_' . $tag; |
|
| 541 | + $subTags[] = $source.'_'.$tag; |
|
| 542 | 542 | } |
| 543 | 543 | } |
| 544 | 544 | |
@@ -191,8 +191,8 @@ discard block |
||
| 191 | 191 | */ |
| 192 | 192 | private function limitToDBField(IQueryBuilder &$qb, string $field, string $value) { |
| 193 | 193 | $expr = $qb->expr(); |
| 194 | - $pf = ($qb->getType() === QueryBuilder::SELECT) ? $this->defaultSelectAlias . '.' : ''; |
|
| 195 | - $field = $pf . $field; |
|
| 194 | + $pf = ($qb->getType() === QueryBuilder::SELECT) ? $this->defaultSelectAlias.'.' : ''; |
|
| 195 | + $field = $pf.$field; |
|
| 196 | 196 | |
| 197 | 197 | $qb->andWhere($expr->eq($field, $qb->createNamedParameter($value))); |
| 198 | 198 | } |
@@ -204,8 +204,8 @@ discard block |
||
| 204 | 204 | */ |
| 205 | 205 | private function limitToDBFieldInt(IQueryBuilder &$qb, string $field, int $value) { |
| 206 | 206 | $expr = $qb->expr(); |
| 207 | - $pf = ($qb->getType() === QueryBuilder::SELECT) ? $this->defaultSelectAlias . '.' : ''; |
|
| 208 | - $field = $pf . $field; |
|
| 207 | + $pf = ($qb->getType() === QueryBuilder::SELECT) ? $this->defaultSelectAlias.'.' : ''; |
|
| 208 | + $field = $pf.$field; |
|
| 209 | 209 | |
| 210 | 210 | $qb->andWhere($expr->eq($field, $qb->createNamedParameter($value))); |
| 211 | 211 | } |
@@ -218,8 +218,8 @@ discard block |
||
| 218 | 218 | */ |
| 219 | 219 | private function limitToDBFieldArray(IQueryBuilder &$qb, string $field, array $values) { |
| 220 | 220 | $expr = $qb->expr(); |
| 221 | - $pf = ($qb->getType() === QueryBuilder::SELECT) ? $this->defaultSelectAlias . '.' : ''; |
|
| 222 | - $field = $pf . $field; |
|
| 221 | + $pf = ($qb->getType() === QueryBuilder::SELECT) ? $this->defaultSelectAlias.'.' : ''; |
|
| 222 | + $field = $pf.$field; |
|
| 223 | 223 | |
| 224 | 224 | if (!is_array($values)) { |
| 225 | 225 | $values = [$values]; |
@@ -239,8 +239,8 @@ discard block |
||
| 239 | 239 | */ |
| 240 | 240 | protected function limitToQueuedIndexes(IQueryBuilder &$qb) { |
| 241 | 241 | $expr = $qb->expr(); |
| 242 | - $pf = ($qb->getType() === QueryBuilder::SELECT) ? $this->defaultSelectAlias . '.' : ''; |
|
| 243 | - $qb->andWhere($expr->neq($pf . 'status', $qb->createNamedParameter(Index::INDEX_OK))); |
|
| 242 | + $pf = ($qb->getType() === QueryBuilder::SELECT) ? $this->defaultSelectAlias.'.' : ''; |
|
| 243 | + $qb->andWhere($expr->neq($pf.'status', $qb->createNamedParameter(Index::INDEX_OK))); |
|
| 244 | 244 | } |
| 245 | 245 | |
| 246 | 246 | } |
@@ -165,7 +165,7 @@ |
||
| 165 | 165 | IFullTextSearchPlatform $platform, IFullTextSearchProvider $provider, string $userId, |
| 166 | 166 | IndexOptions $options |
| 167 | 167 | ) { |
| 168 | - $this->updateRunnerAction('generateIndex' . $provider->getName()); |
|
| 168 | + $this->updateRunnerAction('generateIndex'.$provider->getName()); |
|
| 169 | 169 | $this->updateRunnerInfoArray( |
| 170 | 170 | [ |
| 171 | 171 | 'userId' => $userId, |
@@ -210,7 +210,7 @@ discard block |
||
| 210 | 210 | /** |
| 211 | 211 | * @param IFullTextSearchProvider $provider |
| 212 | 212 | * @param IIndexDocument[] $documents |
| 213 | - * @param IIndexOptions $options |
|
| 213 | + * @param IndexOptions $options |
|
| 214 | 214 | * |
| 215 | 215 | * @return IIndexDocument[] |
| 216 | 216 | * @throws Exception |
@@ -491,7 +491,7 @@ discard block |
||
| 491 | 491 | |
| 492 | 492 | |
| 493 | 493 | /** |
| 494 | - * @param IIndex $index |
|
| 494 | + * @param Index $index |
|
| 495 | 495 | */ |
| 496 | 496 | private function updateIndexError(IIndex $index) { |
| 497 | 497 | |
@@ -31,9 +31,9 @@ |
||
| 31 | 31 | namespace OCA\FullTextSearch\AppInfo; |
| 32 | 32 | |
| 33 | 33 | |
| 34 | -$composerDir = __DIR__ . '/../vendor/'; |
|
| 34 | +$composerDir = __DIR__.'/../vendor/'; |
|
| 35 | 35 | |
| 36 | -if (is_dir($composerDir) && file_exists($composerDir . 'autoload.php')) { |
|
| 37 | - require_once $composerDir . 'autoload.php'; |
|
| 36 | +if (is_dir($composerDir) && file_exists($composerDir.'autoload.php')) { |
|
| 37 | + require_once $composerDir.'autoload.php'; |
|
| 38 | 38 | } |
| 39 | 39 | |
@@ -34,7 +34,7 @@ |
||
| 34 | 34 | use OCP\AppFramework\QueryException; |
| 35 | 35 | |
| 36 | 36 | |
| 37 | -require_once __DIR__ . '/autoload.php'; |
|
| 37 | +require_once __DIR__.'/autoload.php'; |
|
| 38 | 38 | |
| 39 | 39 | try { |
| 40 | 40 | $app = new Application(); |
@@ -77,7 +77,7 @@ discard block |
||
| 77 | 77 | |
| 78 | 78 | |
| 79 | 79 | /** |
| 80 | - * @param IIndexOptions $options |
|
| 80 | + * @param \OCA\FullTextSearch\Model\IndexOptions $options |
|
| 81 | 81 | * |
| 82 | 82 | * @return IIndexDocument |
| 83 | 83 | */ |
@@ -104,7 +104,7 @@ discard block |
||
| 104 | 104 | |
| 105 | 105 | |
| 106 | 106 | /** |
| 107 | - * @param IIndexOptions $options |
|
| 107 | + * @param \OCA\FullTextSearch\Model\IndexOptions $options |
|
| 108 | 108 | * |
| 109 | 109 | * @return IIndexDocument |
| 110 | 110 | */ |
@@ -85,7 +85,7 @@ discard block |
||
| 85 | 85 | public function generateIndexDocumentContentLicense(IIndexOptions $options): IIndexDocument { |
| 86 | 86 | $indexDocument = $this->generateIndexDocument(self::DOCUMENT_TYPE_LICENSE); |
| 87 | 87 | |
| 88 | - $content = file_get_contents(__DIR__ . '/../../LICENSE'); |
|
| 88 | + $content = file_get_contents(__DIR__.'/../../LICENSE'); |
|
| 89 | 89 | $indexDocument->setContent($content); |
| 90 | 90 | |
| 91 | 91 | if ($options === null) { |
@@ -142,7 +142,7 @@ discard block |
||
| 142 | 142 | $orig = call_user_func([$origIndex, $method]); |
| 143 | 143 | $compare = call_user_func([$compareIndex, $method]); |
| 144 | 144 | if ($orig !== $compare) { |
| 145 | - throw new Exception($method . '() orig:' . $orig . ' compare:' . $compare); |
|
| 145 | + throw new Exception($method.'() orig:'.$orig.' compare:'.$compare); |
|
| 146 | 146 | } |
| 147 | 147 | } |
| 148 | 148 | } |
@@ -123,13 +123,13 @@ |
||
| 123 | 123 | */ |
| 124 | 124 | private function displaySearchResult(ISearchResult $searchResult) { |
| 125 | 125 | /** @var SearchResult $searchResult */ |
| 126 | - echo '> ' . $searchResult->getProvider() |
|
| 127 | - ->getName() . "\n"; |
|
| 126 | + echo '> '.$searchResult->getProvider() |
|
| 127 | + ->getName()."\n"; |
|
| 128 | 128 | |
| 129 | 129 | /** @var IIndexDocument[] $result */ |
| 130 | 130 | $result = $searchResult->getDocuments(); |
| 131 | 131 | foreach ($result as $document) { |
| 132 | - echo ' - ' . $document->getId() . ' score:' . $document->getScore() . "\n"; |
|
| 132 | + echo ' - '.$document->getId().' score:'.$document->getScore()."\n"; |
|
| 133 | 133 | } |
| 134 | 134 | } |
| 135 | 135 | |