@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | } |
98 | 98 | |
99 | 99 | /** |
100 | - * @param $action |
|
100 | + * @param string $action |
|
101 | 101 | * |
102 | 102 | * @throws InterruptException |
103 | 103 | * @throws TickDoesNotExistException |
@@ -112,7 +112,7 @@ discard block |
||
112 | 112 | |
113 | 113 | |
114 | 114 | /** |
115 | - * @param $line |
|
115 | + * @param string $line |
|
116 | 116 | */ |
117 | 117 | private function outputRunner($line) { |
118 | 118 | if ($this->runner === null) { |
@@ -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 |
@@ -116,7 +116,7 @@ discard block |
||
116 | 116 | |
117 | 117 | |
118 | 118 | /** |
119 | - * @param IFullTextSearchPlatform $platform |
|
119 | + * @param \OCA\FullTextSearch_ElasticSearch\Platform\ElasticSearchPlatform $platform |
|
120 | 120 | * @param Client $client |
121 | 121 | * @param IFullTextSearchProvider $provider |
122 | 122 | * @param IndexDocument $document |
@@ -149,7 +149,7 @@ discard block |
||
149 | 149 | |
150 | 150 | /** |
151 | 151 | * @param Index $index |
152 | - * @param array $result |
|
152 | + * @param callable $result |
|
153 | 153 | * |
154 | 154 | * @return Index |
155 | 155 | */ |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | |
61 | 61 | |
62 | 62 | /** |
63 | - * @param IFullTextSearchPlatform $source |
|
63 | + * @param \OCA\FullTextSearch_ElasticSearch\Platform\ElasticSearchPlatform $source |
|
64 | 64 | * @param Client $client |
65 | 65 | * @param IFullTextSearchProvider $provider |
66 | 66 | * @param DocumentAccess $access |
@@ -92,7 +92,7 @@ discard block |
||
92 | 92 | |
93 | 93 | |
94 | 94 | /** |
95 | - * @param array $result |
|
95 | + * @param callable $result |
|
96 | 96 | * |
97 | 97 | * @return SearchResult |
98 | 98 | */ |
@@ -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 | ]; |