@@ -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); |
@@ -281,7 +281,7 @@ |
||
| 281 | 281 | foreach ($ak as $source) { |
| 282 | 282 | $tags = $this->subTags[$source]; |
| 283 | 283 | foreach ($tags as $tag) { |
| 284 | - $subTags[] = $source . '_' . $tag; |
|
| 284 | + $subTags[] = $source.'_'.$tag; |
|
| 285 | 285 | } |
| 286 | 286 | } |
| 287 | 287 | |
@@ -169,7 +169,7 @@ discard block |
||
| 169 | 169 | |
| 170 | 170 | $options = ['is', 'show']; |
| 171 | 171 | if (in_array($kw, $options)) { |
| 172 | - $this->addOption($kw . '_' . $value, '1'); |
|
| 172 | + $this->addOption($kw.'_'.$value, '1'); |
|
| 173 | 173 | |
| 174 | 174 | return true; |
| 175 | 175 | } |
@@ -422,7 +422,7 @@ discard block |
||
| 422 | 422 | foreach ($ak as $source) { |
| 423 | 423 | $tags = $this->subTags[$source]; |
| 424 | 424 | foreach ($tags as $tag) { |
| 425 | - $subTags[] = $source . '_' . $tag; |
|
| 425 | + $subTags[] = $source.'_'.$tag; |
|
| 426 | 426 | } |
| 427 | 427 | } |
| 428 | 428 | |
@@ -514,7 +514,7 @@ discard block |
||
| 514 | 514 | $index = $result['index']; |
| 515 | 515 | $resultIndex = ''; |
| 516 | 516 | if ($index !== null) { |
| 517 | - $resultIndex = $index->getProviderId() . ':' . $index->getDocumentId(); |
|
| 517 | + $resultIndex = $index->getProviderId().':'.$index->getDocumentId(); |
|
| 518 | 518 | } |
| 519 | 519 | |
| 520 | 520 | |
@@ -571,7 +571,7 @@ discard block |
||
| 571 | 571 | $index = $error['index']; |
| 572 | 572 | $errorIndex = ''; |
| 573 | 573 | if ($index !== null) { |
| 574 | - $errorIndex = $index->getProviderId() . ':' . $index->getDocumentId(); |
|
| 574 | + $errorIndex = $index->getProviderId().':'.$index->getDocumentId(); |
|
| 575 | 575 | } |
| 576 | 576 | |
| 577 | 577 | $width = $this->terminal->getWidth() - 13; |
@@ -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 | |
@@ -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 | |
@@ -563,7 +563,7 @@ discard block |
||
| 563 | 563 | |
| 564 | 564 | $this->output( |
| 565 | 565 | $output, |
| 566 | - '(result: ' . $searchResult->getCount() . ', expected: ' . json_encode($expected) . ')', |
|
| 566 | + '(result: '.$searchResult->getCount().', expected: '.json_encode($expected).')', |
|
| 567 | 567 | false |
| 568 | 568 | ); |
| 569 | 569 | $this->compareSearchResult($searchResult, $expected); |
@@ -627,12 +627,12 @@ discard block |
||
| 627 | 627 | private function compareSearchResult(SearchResult $searchResult, $entries) { |
| 628 | 628 | $documents = $searchResult->getDocuments(); |
| 629 | 629 | if (sizeof($documents) !== sizeof($entries)) { |
| 630 | - throw new \Exception('Unexpected SearchResult: ' . json_encode($searchResult)); |
|
| 630 | + throw new \Exception('Unexpected SearchResult: '.json_encode($searchResult)); |
|
| 631 | 631 | } |
| 632 | 632 | |
| 633 | 633 | foreach ($documents as $document) { |
| 634 | 634 | if (!in_array($document->getId(), $entries)) { |
| 635 | - throw new \Exception('Unexpected Document: ' . json_encode($document)); |
|
| 635 | + throw new \Exception('Unexpected Document: '.json_encode($document)); |
|
| 636 | 636 | } |
| 637 | 637 | } |
| 638 | 638 | } |
@@ -645,7 +645,7 @@ discard block |
||
| 645 | 645 | * @throws InterruptException |
| 646 | 646 | */ |
| 647 | 647 | private function pause(OutputInterface $output, $s) { |
| 648 | - $this->output($output, 'Pausing ' . $s . ' seconds'); |
|
| 648 | + $this->output($output, 'Pausing '.$s.' seconds'); |
|
| 649 | 649 | |
| 650 | 650 | for ($i = 1; $i <= $s; $i++) { |
| 651 | 651 | if (time_nanosleep(1, 0) !== true) { |