@@ -26,9 +26,9 @@ |
||
26 | 26 | |
27 | 27 | namespace OCA\FullTextSearch_ElasticSearch\AppInfo; |
28 | 28 | |
29 | -$composerDir = __DIR__ . '/../vendor/'; |
|
29 | +$composerDir = __DIR__.'/../vendor/'; |
|
30 | 30 | |
31 | -if (is_dir($composerDir) && file_exists($composerDir . 'autoload.php')) { |
|
32 | - require_once $composerDir . 'autoload.php'; |
|
31 | +if (is_dir($composerDir) && file_exists($composerDir.'autoload.php')) { |
|
32 | + require_once $composerDir.'autoload.php'; |
|
33 | 33 | } |
34 | 34 |
@@ -26,6 +26,6 @@ |
||
26 | 26 | |
27 | 27 | namespace OCA\FullTextSearch_ElasticSearch\AppInfo; |
28 | 28 | |
29 | -require_once __DIR__ . '/autoload.php'; |
|
29 | +require_once __DIR__.'/autoload.php'; |
|
30 | 30 | |
31 | 31 | new Application(); |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | 'index' => |
76 | 76 | [ |
77 | 77 | 'index' => $this->configService->getElasticIndex(), |
78 | - 'id' => $document->getProviderId() . ':' . $document->getId(), |
|
78 | + 'id' => $document->getProviderId().':'.$document->getId(), |
|
79 | 79 | 'type' => 'standard', |
80 | 80 | 'body' => $this->generateIndexBody($document) |
81 | 81 | ] |
@@ -105,7 +105,7 @@ discard block |
||
105 | 105 | 'index' => |
106 | 106 | [ |
107 | 107 | 'index' => $this->configService->getElasticIndex(), |
108 | - 'id' => $document->getProviderId() . ':' . $document->getId(), |
|
108 | + 'id' => $document->getProviderId().':'.$document->getId(), |
|
109 | 109 | 'type' => 'standard', |
110 | 110 | 'body' => ['doc' => $this->generateIndexBody($document)] |
111 | 111 | ] |
@@ -133,7 +133,7 @@ discard block |
||
133 | 133 | 'index' => |
134 | 134 | [ |
135 | 135 | 'index' => $this->configService->getElasticIndex(), |
136 | - 'id' => $providerId . ':' . $documentId, |
|
136 | + 'id' => $providerId.':'.$documentId, |
|
137 | 137 | 'type' => 'standard' |
138 | 138 | ] |
139 | 139 | ]; |
@@ -100,12 +100,12 @@ discard block |
||
100 | 100 | public function getConfiguration() { |
101 | 101 | |
102 | 102 | $parsedHost = parse_url($this->configService->getElasticHost()); |
103 | - $safeHost = $parsedHost['scheme'] . '://'; |
|
103 | + $safeHost = $parsedHost['scheme'].'://'; |
|
104 | 104 | if (array_key_exists('user', $parsedHost)) { |
105 | - $safeHost .= $parsedHost['user'] . ':' . '********' . '@'; |
|
105 | + $safeHost .= $parsedHost['user'].':'.'********'.'@'; |
|
106 | 106 | } |
107 | 107 | $safeHost .= $parsedHost['host']; |
108 | - $safeHost .= ':' . $parsedHost['port']; |
|
108 | + $safeHost .= ':'.$parsedHost['port']; |
|
109 | 109 | |
110 | 110 | return [ |
111 | 111 | 'host' => $safeHost, |
@@ -240,12 +240,12 @@ discard block |
||
240 | 240 | public function indexDocument(IFullTextSearchProvider $provider, IndexDocument $document) { |
241 | 241 | |
242 | 242 | $this->updateRunner('indexDocument'); |
243 | - $this->outputRunner(' . Indexing: ' . $document->getTitle()); |
|
243 | + $this->outputRunner(' . Indexing: '.$document->getTitle()); |
|
244 | 244 | |
245 | 245 | try { |
246 | 246 | $result = |
247 | 247 | $this->indexService->indexDocument($this, $this->client, $provider, $document); |
248 | - $this->outputRunner(' result: ' . json_encode($result)); |
|
248 | + $this->outputRunner(' result: '.json_encode($result)); |
|
249 | 249 | |
250 | 250 | return $this->indexService->parseIndexResult($document->getIndex(), $result); |
251 | 251 | } catch (Exception $e) { |
@@ -278,7 +278,7 @@ discard block |
||
278 | 278 | $index->setMessage(json_encode($message)); |
279 | 279 | |
280 | 280 | $result = $this->indexService->indexDocument($this, $this->client, $provider, $document); |
281 | - $this->outputRunner(' result with no content: ' . json_encode($result)); |
|
281 | + $this->outputRunner(' result with no content: '.json_encode($result)); |
|
282 | 282 | |
283 | 283 | return $this->indexService->parseIndexResult($document->getIndex(), $result); |
284 | 284 | } |
@@ -331,7 +331,7 @@ discard block |
||
331 | 331 | echo "Max retries!"; |
332 | 332 | } |
333 | 333 | } catch (Exception $e) { |
334 | - echo ' ElasticSearchPlatform::load() Exception --- ' . $e->getMessage() . "\n"; |
|
334 | + echo ' ElasticSearchPlatform::load() Exception --- '.$e->getMessage()."\n"; |
|
335 | 335 | } |
336 | 336 | } |
337 | 337 |