Completed
Push — master ( 3aefd8...b604ed )
by Maxence
05:33
created
lib/Platform/ElasticSearchPlatform.php 2 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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) {
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -106,12 +106,12 @@  discard block
 block discarded – undo
106 106
 
107 107
 		foreach ($hosts as $host) {
108 108
 			$parsedHost = parse_url($host);
109
-			$safeHost = $parsedHost['scheme'] . '://';
109
+			$safeHost = $parsedHost['scheme'].'://';
110 110
 			if (array_key_exists('user', $parsedHost)) {
111
-				$safeHost .= $parsedHost['user'] . ':' . '********' . '@';
111
+				$safeHost .= $parsedHost['user'].':'.'********'.'@';
112 112
 			}
113 113
 			$safeHost .= $parsedHost['host'];
114
-			$safeHost .= ':' . $parsedHost['port'];
114
+			$safeHost .= ':'.$parsedHost['port'];
115 115
 
116 116
 			$result[] = $safeHost;
117 117
 		}
@@ -245,13 +245,13 @@  discard block
 block discarded – undo
245 245
 	public function indexDocument(IFullTextSearchProvider $provider, IndexDocument $document) {
246 246
 
247 247
 		$this->updateRunner('indexDocument');
248
-		$this->outputRunner(' . Indexing: ' . $document->getTitle());
248
+		$this->outputRunner(' . Indexing: '.$document->getTitle());
249 249
 
250 250
 		$document->initHash();
251 251
 
252 252
 		try {
253 253
 			$result = $this->indexService->indexDocument($this->client, $provider, $document);
254
-			$this->outputRunner('  result: ' . json_encode($result));
254
+			$this->outputRunner('  result: '.json_encode($result));
255 255
 
256 256
 			return $this->indexService->parseIndexResult($document->getIndex(), $result);
257 257
 		} catch (Exception $e) {
@@ -284,7 +284,7 @@  discard block
 block discarded – undo
284 284
 		$index->setMessage(json_encode($message));
285 285
 
286 286
 		$result = $this->indexService->indexDocument($this->client, $provider, $document);
287
-		$this->outputRunner('  result with no content: ' . json_encode($result));
287
+		$this->outputRunner('  result with no content: '.json_encode($result));
288 288
 
289 289
 		return $this->indexService->parseIndexResult($document->getIndex(), $result);
290 290
 	}
@@ -339,7 +339,7 @@  discard block
 block discarded – undo
339 339
 				echo "Max retries!";
340 340
 			}
341 341
 		} catch (Exception $e) {
342
-			echo ' ElasticSearchPlatform::load() Exception --- ' . $e->getMessage() . "\n";
342
+			echo ' ElasticSearchPlatform::load() Exception --- '.$e->getMessage()."\n";
343 343
 		}
344 344
 	}
345 345
 
Please login to merge, or discard this patch.
appinfo/autoload.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -26,9 +26,9 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
appinfo/app.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,6 +26,6 @@
 block discarded – undo
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();
Please login to merge, or discard this patch.
lib/Service/IndexMappingService.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 		];
Please login to merge, or discard this patch.
lib/Service/IndexService.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -157,7 +157,7 @@
 block discarded – undo
157 157
 
158 158
 	/**
159 159
 	 * @param Index $index
160
-	 * @param array $result
160
+	 * @param callable $result
161 161
 	 *
162 162
 	 * @return Index
163 163
 	 */
Please login to merge, or discard this patch.
lib/Service/SearchService.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -87,7 +87,7 @@
 block discarded – undo
87 87
 
88 88
 
89 89
 	/**
90
-	 * @param array $result
90
+	 * @param callable $result
91 91
 	 *
92 92
 	 * @return SearchResult
93 93
 	 */
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -84,7 +84,7 @@
 block discarded – undo
84 84
 			$result = $client->search($query['params']);
85 85
 		} catch (Exception $e) {
86 86
 			$this->miscService->log(
87
-				'debug - request: ' . json_encode($request) . '   - query: ' . json_encode($query)
87
+				'debug - request: '.json_encode($request).'   - query: '.json_encode($query)
88 88
 			);
89 89
 			throw $e;
90 90
 		}
Please login to merge, or discard this patch.
lib/Service/SearchMappingService.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -253,7 +253,7 @@  discard block
 block discarded – undo
253 253
 	private function generateQueryContentFields(SearchRequest $request, QueryContent $content) {
254 254
 		$parts = array_map(
255 255
 			function($value) {
256
-				return 'parts.' . $value;
256
+				return 'parts.'.$value;
257 257
 			}, $request->getParts()
258 258
 		);
259 259
 		$fields = array_merge(['content', 'title'], $request->getFields(), $parts);
@@ -267,7 +267,7 @@  discard block
 block discarded – undo
267 267
 
268 268
 		foreach ($request->getWildcardFields() as $field) {
269 269
 			if (!$this->fieldIsOutLimit($request, $field)) {
270
-				$queryFields[] = ['wildcard' => [$field => '*' . $content->getWord() . '*']];
270
+				$queryFields[] = ['wildcard' => [$field => '*'.$content->getWord().'*']];
271 271
 			}
272 272
 		}
273 273
 
Please login to merge, or discard this patch.