@@ -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 | |
@@ -126,12 +126,12 @@  | 
                                                    ||
| 126 | 126 | $output->writeln(substr($content, 0, 80));  | 
                                                        
| 127 | 127 | |
| 128 | 128 | $parts = $indexDocument->getParts();  | 
                                                        
| 129 | - $output->writeln(sizeof($parts) . ' Part(s)');  | 
                                                        |
| 129 | + $output->writeln(sizeof($parts).' Part(s)');  | 
                                                        |
| 130 | 130 |  		foreach (array_keys($parts) as $part) { | 
                                                        
| 131 | 131 | $output->writeln(  | 
                                                        
| 132 | - "'" . $part . "' " . substr($parts[$part], 0, 80) . ' (size: ' . strlen(  | 
                                                        |
| 132 | + "'".$part."' ".substr($parts[$part], 0, 80).' (size: '.strlen(  | 
                                                        |
| 133 | 133 | $parts[$part]  | 
                                                        
| 134 | - ) . ')'  | 
                                                        |
| 134 | + ).')'  | 
                                                        |
| 135 | 135 | );  | 
                                                        
| 136 | 136 | }  | 
                                                        
| 137 | 137 | |
@@ -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 | |
@@ -250,7 +250,7 @@ discard block  | 
                                                    ||
| 250 | 250 | }  | 
                                                        
| 251 | 251 | |
| 252 | 252 |  		if ($color !== '') { | 
                                                        
| 253 | - $this->info[$info . 'Colored'] = '<' . $color . '>' . $value . '</' . $color . '>';  | 
                                                        |
| 253 | + $this->info[$info.'Colored'] = '<'.$color.'>'.$value.'</'.$color.'>';  | 
                                                        |
| 254 | 254 | }  | 
                                                        
| 255 | 255 | }  | 
                                                        
| 256 | 256 | |
@@ -393,7 +393,7 @@ discard block  | 
                                                    ||
| 393 | 393 | return;  | 
                                                        
| 394 | 394 | }  | 
                                                        
| 395 | 395 | |
| 396 | -		$this->setInfo('_memory', round((memory_get_usage() / 1024 / 1024)) . ' MB'); | 
                                                        |
| 396 | +		$this->setInfo('_memory', round((memory_get_usage() / 1024 / 1024)).' MB'); | 
                                                        |
| 397 | 397 | $this->ramUpdate = $tick;  | 
                                                        
| 398 | 398 | }  | 
                                                        
| 399 | 399 | |
@@ -406,7 +406,7 @@ discard block  | 
                                                    ||
| 406 | 406 | */  | 
                                                        
| 407 | 407 |  	public function exception(string $reason, bool $stop) { | 
                                                        
| 408 | 408 |  		if (!$stop) { | 
                                                        
| 409 | -			$this->output('Exception: ' . $reason); | 
                                                        |
| 409 | +			$this->output('Exception: '.$reason); | 
                                                        |
| 410 | 410 | // TODO: feed an array of exceptions for log;  | 
                                                        
| 411 | 411 |  		} else { | 
                                                        
| 412 | 412 |  			try { | 
                                                        
@@ -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 | }  | 
                                                        
@@ -122,7 +122,7 @@ discard block  | 
                                                    ||
| 122 | 122 | $provider = OC::$server->query((string)$providerId);  | 
                                                        
| 123 | 123 |  		if (!($provider instanceof IFullTextSearchProvider)) { | 
                                                        
| 124 | 124 | throw new ProviderIsNotCompatibleException(  | 
                                                        
| 125 | - $providerId . ' is not a compatible IFullTextSearchProvider'  | 
                                                        |
| 125 | + $providerId.' is not a compatible IFullTextSearchProvider'  | 
                                                        |
| 126 | 126 | );  | 
                                                        
| 127 | 127 | }  | 
                                                        
| 128 | 128 | |
@@ -211,7 +211,7 @@ discard block  | 
                                                    ||
| 211 | 211 | }  | 
                                                        
| 212 | 212 | }  | 
                                                        
| 213 | 213 | |
| 214 | -		throw new ProviderDoesNotExistException('Provider \'' . $providerId . '\' does not exist'); | 
                                                        |
| 214 | +		throw new ProviderDoesNotExistException('Provider \''.$providerId.'\' does not exist'); | 
                                                        |
| 215 | 215 | }  | 
                                                        
| 216 | 216 | |
| 217 | 217 | |
@@ -305,9 +305,9 @@ discard block  | 
                                                    ||
| 305 | 305 | $this->loadProvider($appId, $provider);  | 
                                                        
| 306 | 306 |  			} catch (Exception $e) { | 
                                                        
| 307 | 307 | $this->miscService->log(  | 
                                                        
| 308 | - 'Issue while loading Provider: ' . $appId . '/' . $provider . ' - ' . get_class(  | 
                                                        |
| 308 | + 'Issue while loading Provider: '.$appId.'/'.$provider.' - '.get_class(  | 
                                                        |
| 309 | 309 | $e  | 
                                                        
| 310 | - ) . ' ' . $e->getMessage()  | 
                                                        |
| 310 | + ).' '.$e->getMessage()  | 
                                                        |
| 311 | 311 | );  | 
                                                        
| 312 | 312 | }  | 
                                                        
| 313 | 313 | }  | 
                                                        
@@ -325,7 +325,7 @@ discard block  | 
                                                    ||
| 325 | 325 | $knownProvider = $providerWrapper->getProvider();  | 
                                                        
| 326 | 326 |  			if ($knownProvider->getId() === $provider->getId()) { | 
                                                        
| 327 | 327 | throw new ProviderIsNotUniqueException(  | 
                                                        
| 328 | - 'FullTextSearchProvider ' . $provider->getId() . ' already exist'  | 
                                                        |
| 328 | + 'FullTextSearchProvider '.$provider->getId().' already exist'  | 
                                                        |
| 329 | 329 | );  | 
                                                        
| 330 | 330 | }  | 
                                                        
| 331 | 331 | }  | 
                                                        
@@ -173,7 +173,7 @@ discard block  | 
                                                    ||
| 173 | 173 | $platform = OC::$server->query((string)$selected->getClass());  | 
                                                        
| 174 | 174 |  		if (!($platform instanceof IFullTextSearchPlatform)) { | 
                                                        
| 175 | 175 | throw new PlatformIsNotCompatibleException(  | 
                                                        
| 176 | - $selected->getClass() . ' is not a compatible FullTextSearchPlatform'  | 
                                                        |
| 176 | + $selected->getClass().' is not a compatible FullTextSearchPlatform'  | 
                                                        |
| 177 | 177 | );  | 
                                                        
| 178 | 178 | }  | 
                                                        
| 179 | 179 | |
@@ -205,7 +205,7 @@ discard block  | 
                                                    ||
| 205 | 205 | }  | 
                                                        
| 206 | 206 | |
| 207 | 207 | throw new PlatformDoesNotExistException(  | 
                                                        
| 208 | - 'FullTextSearchPlatform ' . $selected . ' is not available'  | 
                                                        |
| 208 | + 'FullTextSearchPlatform '.$selected.' is not available'  | 
                                                        |
| 209 | 209 | );  | 
                                                        
| 210 | 210 | }  | 
                                                        
| 211 | 211 | |
@@ -103,7 +103,7 @@ discard block  | 
                                                    ||
| 103 | 103 | $this->runner->stop();  | 
                                                        
| 104 | 104 |  		} catch (RunnerAlreadyUpException $e) { | 
                                                        
| 105 | 105 |  		} catch (Exception $e) { | 
                                                        
| 106 | -			$this->miscService->log('Exception while cronIndex: ' . get_class($e) . ' - ' . $e->getMessage()); | 
                                                        |
| 106 | +			$this->miscService->log('Exception while cronIndex: '.get_class($e).' - '.$e->getMessage()); | 
                                                        |
| 107 | 107 | $this->runner->exception($e->getMessage(), true);  | 
                                                        
| 108 | 108 | }  | 
                                                        
| 109 | 109 | |
@@ -133,7 +133,7 @@ discard block  | 
                                                    ||
| 133 | 133 | |
| 134 | 134 | $this->indexService->updateDocument($platform, $provider, $index);  | 
                                                        
| 135 | 135 |  			} catch (Throwable | Exception $e) { | 
                                                        
| 136 | - $this->runner->exception(get_class($e) . ' - ' . $e->getMessage(), false);  | 
                                                        |
| 136 | + $this->runner->exception(get_class($e).' - '.$e->getMessage(), false);  | 
                                                        |
| 137 | 137 | // TODO - upgrade error number - after too many errors, delete index  | 
                                                        
| 138 | 138 | // TODO - do not count error if elasticsearch is down.  | 
                                                        
| 139 | 139 | }  | 
                                                        
@@ -128,14 +128,14 @@ discard block  | 
                                                    ||
| 128 | 128 | |
| 129 | 129 | |
| 130 | 130 |  		if ($json) { | 
                                                        
| 131 | - echo json_encode($index, JSON_PRETTY_PRINT) . "\n";  | 
                                                        |
| 131 | + echo json_encode($index, JSON_PRETTY_PRINT)."\n";  | 
                                                        |
| 132 | 132 | |
| 133 | 133 | return 0;  | 
                                                        
| 134 | 134 | }  | 
                                                        
| 135 | 135 | |
| 136 | 136 | $status = $this->statusConvertToString($index->getStatus());  | 
                                                        
| 137 | 137 | $desc = $this->statusAvailable[$status];  | 
                                                        
| 138 | -		$output->writeln('current status: <info>' . $status . '</info> (' . $desc . ')'); | 
                                                        |
| 138 | +		$output->writeln('current status: <info>'.$status.'</info> ('.$desc.')'); | 
                                                        |
| 139 | 139 | |
| 140 | 140 | return 0;  | 
                                                        
| 141 | 141 | }  | 
                                                        
@@ -196,7 +196,7 @@ discard block  | 
                                                    ||
| 196 | 196 | return IIndex::INDEX_FAILED;  | 
                                                        
| 197 | 197 | }  | 
                                                        
| 198 | 198 | |
| 199 | -		throw new Exception("Specify a valid status: " . implode(', ', array_keys($this->statusAvailable))); | 
                                                        |
| 199 | +		throw new Exception("Specify a valid status: ".implode(', ', array_keys($this->statusAvailable))); | 
                                                        |
| 200 | 200 | }  | 
                                                        
| 201 | 201 | |
| 202 | 202 | }  |