@@ -56,7 +56,6 @@ |
||
56 | 56 | * Provider constructor. |
57 | 57 | * |
58 | 58 | * @param string $appId |
59 | - * @param IFullTextSearchPlatform $platform |
|
60 | 59 | */ |
61 | 60 | public function __construct($appId, $class) { |
62 | 61 | $this->appId = $appId; |
@@ -105,8 +105,8 @@ |
||
105 | 105 | /** |
106 | 106 | * Get a version of an app |
107 | 107 | * |
108 | - * @param string $key |
|
109 | 108 | * |
109 | + * @param string $appId |
|
110 | 110 | * @return string |
111 | 111 | */ |
112 | 112 | public function getAppVersion($appId) { |
@@ -100,7 +100,7 @@ discard block |
||
100 | 100 | } |
101 | 101 | |
102 | 102 | $output->writeln( |
103 | - 'Full text search ' . $this->configService->getAppValue('installed_version') |
|
103 | + 'Full text search '.$this->configService->getAppValue('installed_version') |
|
104 | 104 | ); |
105 | 105 | $output->writeln(' '); |
106 | 106 | |
@@ -173,7 +173,7 @@ discard block |
||
173 | 173 | |
174 | 174 | $output->writeln('- Search Platform:'); |
175 | 175 | |
176 | - $output->writeln($platform->getName() . ' ' . $wrapper->getVersion()); |
|
176 | + $output->writeln($platform->getName().' '.$wrapper->getVersion()); |
|
177 | 177 | echo json_encode($platform->getConfiguration(), JSON_PRETTY_PRINT); |
178 | 178 | |
179 | 179 | $output->writeln(' '); |
@@ -199,7 +199,7 @@ discard block |
||
199 | 199 | |
200 | 200 | foreach ($providers as $providerWrapper) { |
201 | 201 | $provider = $providerWrapper->getProvider(); |
202 | - $output->writeln($provider->getName() . ' ' . $providerWrapper->getVersion()); |
|
202 | + $output->writeln($provider->getName().' '.$providerWrapper->getVersion()); |
|
203 | 203 | echo json_encode($provider->getConfiguration(), JSON_PRETTY_PRINT); |
204 | 204 | $output->writeln(''); |
205 | 205 | } |
@@ -207,7 +207,7 @@ discard block |
||
207 | 207 | $output->write(' ', true); |
208 | 208 | } |
209 | 209 | |
210 | - $output->write($line . ' ', false); |
|
210 | + $output->write($line.' ', false); |
|
211 | 211 | } |
212 | 212 | |
213 | 213 | |
@@ -257,7 +257,7 @@ discard block |
||
257 | 257 | $this->output($output, 'Testing mocked provider: get indexable documents.'); |
258 | 258 | $indexableDocuments = |
259 | 259 | $testProvider->generateIndexableDocuments(TestService::DOCUMENT_USER1); |
260 | - $this->output($output, '(' . sizeof($indexableDocuments) . ' items)', false); |
|
260 | + $this->output($output, '('.sizeof($indexableDocuments).' items)', false); |
|
261 | 261 | $this->output($output, true); |
262 | 262 | } |
263 | 263 | |
@@ -273,12 +273,12 @@ discard block |
||
273 | 273 | $wrapper = $this->platformService->getPlatform(); |
274 | 274 | $testPlatform = $wrapper->getPlatform(); |
275 | 275 | |
276 | - $this->output($output, '(' . $testPlatform->getName() . ')', false); |
|
276 | + $this->output($output, '('.$testPlatform->getName().')', false); |
|
277 | 277 | $this->output($output, true); |
278 | 278 | |
279 | 279 | $this->output($output, 'Testing search platform.'); |
280 | 280 | if (!$testPlatform->testPlatform()) { |
281 | - throw new Exception ('Search platform (' . $testPlatform->getName() . ') down ?'); |
|
281 | + throw new Exception('Search platform ('.$testPlatform->getName().') down ?'); |
|
282 | 282 | } |
283 | 283 | $this->output($output, true); |
284 | 284 | |
@@ -374,13 +374,13 @@ discard block |
||
374 | 374 | ); |
375 | 375 | |
376 | 376 | $this->output( |
377 | - $output, '(size: ' . $indexDocument->getContentSize() . ')', false |
|
377 | + $output, '(size: '.$indexDocument->getContentSize().')', false |
|
378 | 378 | ); |
379 | 379 | $this->output($output, true); |
380 | 380 | } catch (Exception $e) { |
381 | 381 | throw new Exception( |
382 | - "Issue while getting test document '" . TestService::DOCUMENT_TYPE_LICENSE |
|
383 | - . "' from search platform: " . $e->getMessage() |
|
382 | + "Issue while getting test document '".TestService::DOCUMENT_TYPE_LICENSE |
|
383 | + . "' from search platform: ".$e->getMessage() |
|
384 | 384 | ); |
385 | 385 | } |
386 | 386 | |
@@ -554,7 +554,7 @@ discard block |
||
554 | 554 | ) { |
555 | 555 | $this->output( |
556 | 556 | $output, |
557 | - " - '" . $search . "'" . (($moreOutput === '') ? '' : ' - ' . $moreOutput . ' - ') |
|
557 | + " - '".$search."'".(($moreOutput === '') ? '' : ' - '.$moreOutput.' - ') |
|
558 | 558 | ); |
559 | 559 | $request = new SearchRequest(); |
560 | 560 | |
@@ -568,7 +568,7 @@ discard block |
||
568 | 568 | |
569 | 569 | $this->output( |
570 | 570 | $output, |
571 | - '(result: ' . $searchResult->getCount() . ', expected: ' . json_encode($expected) . ')', |
|
571 | + '(result: '.$searchResult->getCount().', expected: '.json_encode($expected).')', |
|
572 | 572 | false |
573 | 573 | ); |
574 | 574 | $this->compareSearchResult($searchResult, $expected); |
@@ -632,12 +632,12 @@ discard block |
||
632 | 632 | private function compareSearchResult(SearchResult $searchResult, $entries) { |
633 | 633 | $documents = $searchResult->getDocuments(); |
634 | 634 | if (sizeof($documents) !== sizeof($entries)) { |
635 | - throw new \Exception('Unexpected SearchResult: ' . json_encode($searchResult)); |
|
635 | + throw new \Exception('Unexpected SearchResult: '.json_encode($searchResult)); |
|
636 | 636 | } |
637 | 637 | |
638 | 638 | foreach ($documents as $document) { |
639 | 639 | if (!in_array($document->getId(), $entries)) { |
640 | - throw new \Exception('Unexpected Document: ' . json_encode($document)); |
|
640 | + throw new \Exception('Unexpected Document: '.json_encode($document)); |
|
641 | 641 | } |
642 | 642 | } |
643 | 643 | } |
@@ -650,7 +650,7 @@ discard block |
||
650 | 650 | * @throws InterruptException |
651 | 651 | */ |
652 | 652 | private function pause(OutputInterface $output, $s) { |
653 | - $this->output($output, 'Pausing ' . $s . ' seconds'); |
|
653 | + $this->output($output, 'Pausing '.$s.' seconds'); |
|
654 | 654 | |
655 | 655 | for ($i = 1; $i <= $s; $i++) { |
656 | 656 | if (time_nanosleep(1, 0) !== true) { |
@@ -161,7 +161,7 @@ discard block |
||
161 | 161 | $platform = \OC::$server->query((string)$selected->getClass()); |
162 | 162 | if (!($platform instanceof IFullTextSearchPlatform)) { |
163 | 163 | throw new PlatformIsNotCompatibleException( |
164 | - $selected . ' is not a compatible FullTextSearchPlatform' |
|
164 | + $selected.' is not a compatible FullTextSearchPlatform' |
|
165 | 165 | ); |
166 | 166 | } |
167 | 167 | |
@@ -193,7 +193,7 @@ discard block |
||
193 | 193 | } |
194 | 194 | |
195 | 195 | throw new PlatformDoesNotExistException( |
196 | - 'FullTextSearchPlatform ' . $selected . ' is not available' |
|
196 | + 'FullTextSearchPlatform '.$selected.' is not available' |
|
197 | 197 | ); |
198 | 198 | } |
199 | 199 |
@@ -107,7 +107,7 @@ discard block |
||
107 | 107 | $provider = \OC::$server->query((string)$providerId); |
108 | 108 | if (!($provider instanceof IFullTextSearchProvider)) { |
109 | 109 | throw new ProviderIsNotCompatibleException( |
110 | - $providerId . ' is not a compatible IFullTextSearchProvider' |
|
110 | + $providerId.' is not a compatible IFullTextSearchProvider' |
|
111 | 111 | ); |
112 | 112 | } |
113 | 113 | |
@@ -196,7 +196,7 @@ discard block |
||
196 | 196 | } |
197 | 197 | } |
198 | 198 | |
199 | - throw new ProviderDoesNotExistException('Provider \'' . $providerId . '\' does not exist'); |
|
199 | + throw new ProviderDoesNotExistException('Provider \''.$providerId.'\' does not exist'); |
|
200 | 200 | } |
201 | 201 | |
202 | 202 | |
@@ -284,7 +284,7 @@ discard block |
||
284 | 284 | $knownProvider = $providerWrapper->getProvider(); |
285 | 285 | if ($knownProvider->getId() === $provider->getId()) { |
286 | 286 | throw new ProviderIsNotUniqueException( |
287 | - 'FullTextSearchProvider ' . $provider->getId() . ' already exist' |
|
287 | + 'FullTextSearchProvider '.$provider->getId().' already exist' |
|
288 | 288 | ); |
289 | 289 | } |
290 | 290 | } |