@@ -592,7 +592,7 @@ discard block |
||
| 592 | 592 | $index = $error['index']; |
| 593 | 593 | $errorIndex = ''; |
| 594 | 594 | if ($index !== null) { |
| 595 | - $errorIndex = $index->getProviderId() . ':' . $index->getDocumentId(); |
|
| 595 | + $errorIndex = $index->getProviderId().':'.$index->getDocumentId(); |
|
| 596 | 596 | } |
| 597 | 597 | |
| 598 | 598 | $width = $this->terminal->getWidth() - 13; |
@@ -644,7 +644,7 @@ discard block |
||
| 644 | 644 | $index = $result['index']; |
| 645 | 645 | $resultIndex = ''; |
| 646 | 646 | if ($index !== null) { |
| 647 | - $resultIndex = $index->getProviderId() . ':' . $index->getDocumentId(); |
|
| 647 | + $resultIndex = $index->getProviderId().':'.$index->getDocumentId(); |
|
| 648 | 648 | } |
| 649 | 649 | |
| 650 | 650 | |
@@ -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 | } |
@@ -242,7 +242,7 @@ discard block |
||
| 242 | 242 | } |
| 243 | 243 | |
| 244 | 244 | if ($color !== '') { |
| 245 | - $this->info[$info . 'Colored'] = '<' . $color . '>' . $value . '</' . $color . '>'; |
|
| 245 | + $this->info[$info.'Colored'] = '<'.$color.'>'.$value.'</'.$color.'>'; |
|
| 246 | 246 | } |
| 247 | 247 | |
| 248 | 248 | |
@@ -394,7 +394,7 @@ discard block |
||
| 394 | 394 | return; |
| 395 | 395 | } |
| 396 | 396 | |
| 397 | - $this->setInfo('_memory', round((memory_get_usage() / 1024 / 1024)) . ' MB'); |
|
| 397 | + $this->setInfo('_memory', round((memory_get_usage() / 1024 / 1024)).' MB'); |
|
| 398 | 398 | $this->ramUpdate = $tick; |
| 399 | 399 | } |
| 400 | 400 | |
@@ -407,7 +407,7 @@ discard block |
||
| 407 | 407 | */ |
| 408 | 408 | public function exception($reason, $stop) { |
| 409 | 409 | if (!$stop) { |
| 410 | - $this->output('Exception: ' . $reason); |
|
| 410 | + $this->output('Exception: '.$reason); |
|
| 411 | 411 | // TODO: feed an array of exceptions for log; |
| 412 | 412 | } |
| 413 | 413 | $this->runningService->exception($this->tickId, $reason, $stop); |