@@ -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 | } |
@@ -235,7 +235,7 @@ discard block |
||
| 235 | 235 | } |
| 236 | 236 | |
| 237 | 237 | if ($color !== '') { |
| 238 | - $this->info[$info . 'Colored'] = '<' . $color . '>' . $value . '</' . $color . '>'; |
|
| 238 | + $this->info[$info.'Colored'] = '<'.$color.'>'.$value.'</'.$color.'>'; |
|
| 239 | 239 | } |
| 240 | 240 | |
| 241 | 241 | |
@@ -346,7 +346,7 @@ discard block |
||
| 346 | 346 | return; |
| 347 | 347 | } |
| 348 | 348 | |
| 349 | - $this->setInfo('_memory', round((memory_get_usage() / 1024 / 1024)) . ' MB'); |
|
| 349 | + $this->setInfo('_memory', round((memory_get_usage() / 1024 / 1024)).' MB'); |
|
| 350 | 350 | $this->ramTick = $tick; |
| 351 | 351 | } |
| 352 | 352 | |
@@ -358,7 +358,7 @@ discard block |
||
| 358 | 358 | */ |
| 359 | 359 | public function exception($reason, $stop) { |
| 360 | 360 | if (!$stop) { |
| 361 | - $this->output('Exception: ' . $reason); |
|
| 361 | + $this->output('Exception: '.$reason); |
|
| 362 | 362 | // TODO: feed an array of exceptions for log; |
| 363 | 363 | } |
| 364 | 364 | $this->runningService->exception($this->tickId, $reason, $stop); |
@@ -204,7 +204,7 @@ discard block |
||
| 204 | 204 | $output->write(' ', true); |
| 205 | 205 | } |
| 206 | 206 | |
| 207 | - $output->write($line . ' ', false); |
|
| 207 | + $output->write($line.' ', false); |
|
| 208 | 208 | } |
| 209 | 209 | |
| 210 | 210 | |
@@ -254,7 +254,7 @@ discard block |
||
| 254 | 254 | $this->output($output, 'Testing mocked provider: get indexable documents.'); |
| 255 | 255 | $indexableDocuments = |
| 256 | 256 | $testProvider->generateIndexableDocuments(TestService::DOCUMENT_USER1); |
| 257 | - $this->output($output, '(' . sizeof($indexableDocuments) . ' items)', false); |
|
| 257 | + $this->output($output, '('.sizeof($indexableDocuments).' items)', false); |
|
| 258 | 258 | $this->output($output, true); |
| 259 | 259 | } |
| 260 | 260 | |
@@ -268,12 +268,12 @@ discard block |
||
| 268 | 268 | private function testLoadingPlatform($output) { |
| 269 | 269 | $this->output($output, 'Loading search platform.'); |
| 270 | 270 | $testPlatform = $this->platformService->getPlatform(); |
| 271 | - $this->output($output, '(' . $testPlatform->getName() . ')', false); |
|
| 271 | + $this->output($output, '('.$testPlatform->getName().')', false); |
|
| 272 | 272 | $this->output($output, true); |
| 273 | 273 | |
| 274 | 274 | $this->output($output, 'Testing search platform.'); |
| 275 | 275 | if (!$testPlatform->testPlatform()) { |
| 276 | - throw new Exception ('Search platform (' . $testPlatform->getName() . ') down ?'); |
|
| 276 | + throw new Exception('Search platform ('.$testPlatform->getName().') down ?'); |
|
| 277 | 277 | } |
| 278 | 278 | $this->output($output, true); |
| 279 | 279 | |
@@ -369,13 +369,13 @@ discard block |
||
| 369 | 369 | ); |
| 370 | 370 | |
| 371 | 371 | $this->output( |
| 372 | - $output, '(size: ' . $indexDocument->getContentSize() . ')', false |
|
| 372 | + $output, '(size: '.$indexDocument->getContentSize().')', false |
|
| 373 | 373 | ); |
| 374 | 374 | $this->output($output, true); |
| 375 | 375 | } catch (Exception $e) { |
| 376 | 376 | throw new Exception( |
| 377 | - "Issue while getting test document '" . TestService::DOCUMENT_TYPE_LICENSE |
|
| 378 | - . "' from search platform: " . $e->getMessage() |
|
| 377 | + "Issue while getting test document '".TestService::DOCUMENT_TYPE_LICENSE |
|
| 378 | + . "' from search platform: ".$e->getMessage() |
|
| 379 | 379 | ); |
| 380 | 380 | } |
| 381 | 381 | |
@@ -549,7 +549,7 @@ discard block |
||
| 549 | 549 | ) { |
| 550 | 550 | $this->output( |
| 551 | 551 | $output, |
| 552 | - " - '" . $search . "'" . (($moreOutput === '') ? '' : ' - ' . $moreOutput . ' - ') |
|
| 552 | + " - '".$search."'".(($moreOutput === '') ? '' : ' - '.$moreOutput.' - ') |
|
| 553 | 553 | ); |
| 554 | 554 | $request = new SearchRequest(); |
| 555 | 555 | |
@@ -557,7 +557,7 @@ discard block |
||
| 557 | 557 | $searchResult = $testPlatform->searchDocuments($testProvider, $access, $request); |
| 558 | 558 | $this->output( |
| 559 | 559 | $output, |
| 560 | - '(result: ' . $searchResult->getCount() . ', expected: ' . json_encode($expected) . ')', |
|
| 560 | + '(result: '.$searchResult->getCount().', expected: '.json_encode($expected).')', |
|
| 561 | 561 | false |
| 562 | 562 | ); |
| 563 | 563 | $this->compareSearchResult($searchResult, $expected); |
@@ -621,12 +621,12 @@ discard block |
||
| 621 | 621 | private function compareSearchResult(SearchResult $searchResult, $entries) { |
| 622 | 622 | $documents = $searchResult->getDocuments(); |
| 623 | 623 | if (sizeof($documents) !== sizeof($entries)) { |
| 624 | - throw new \Exception('Unexpected SearchResult: ' . json_encode($searchResult)); |
|
| 624 | + throw new \Exception('Unexpected SearchResult: '.json_encode($searchResult)); |
|
| 625 | 625 | } |
| 626 | 626 | |
| 627 | 627 | foreach ($documents as $document) { |
| 628 | 628 | if (!in_array($document->getId(), $entries)) { |
| 629 | - throw new \Exception('Unexpected Document: ' . json_encode($document)); |
|
| 629 | + throw new \Exception('Unexpected Document: '.json_encode($document)); |
|
| 630 | 630 | } |
| 631 | 631 | } |
| 632 | 632 | } |
@@ -639,7 +639,7 @@ discard block |
||
| 639 | 639 | * @throws InterruptException |
| 640 | 640 | */ |
| 641 | 641 | private function pause(OutputInterface $output, $s) { |
| 642 | - $this->output($output, 'Pausing ' . $s . ' seconds'); |
|
| 642 | + $this->output($output, 'Pausing '.$s.' seconds'); |
|
| 643 | 643 | |
| 644 | 644 | for ($i = 1; $i <= $s; $i++) { |
| 645 | 645 | if (time_nanosleep(1, 0) !== true) { |
@@ -461,7 +461,7 @@ |
||
| 461 | 461 | $index = $error['index']; |
| 462 | 462 | $errorIndex = ''; |
| 463 | 463 | if ($index !== null) { |
| 464 | - $errorIndex = $index->getProviderId() . ':' . $index->getDocumentId(); |
|
| 464 | + $errorIndex = $index->getProviderId().':'.$index->getDocumentId(); |
|
| 465 | 465 | } |
| 466 | 466 | |
| 467 | 467 | $width = $this->terminal->getWidth() - 13; |
@@ -461,7 +461,7 @@ |
||
| 461 | 461 | $index = $error['index']; |
| 462 | 462 | $errorIndex = ''; |
| 463 | 463 | if ($index !== null) { |
| 464 | - $errorIndex = $index->getProviderId() . ':' . $index->getDocumentId(); |
|
| 464 | + $errorIndex = $index->getProviderId().':'.$index->getDocumentId(); |
|
| 465 | 465 | } |
| 466 | 466 | |
| 467 | 467 | $width = $this->terminal->getWidth() - 13; |