Completed
Pull Request — master (#116)
by
unknown
01:18
created
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/SearchService.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -189,7 +189,7 @@
 block discarded – undo
189 189
 
190 190
 	/**
191 191
 	 * @param ISearchResult $searchResult
192
-	 * @param array $result
192
+	 * @param callable $result
193 193
 	 */
194 194
 	private function updateSearchResult(ISearchResult $searchResult, array $result) {
195 195
 		$searchResult->setRawResult(json_encode($result));
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
 		Client $client, ISearchResult $searchResult, IDocumentAccess $access
86 86
 	) {
87 87
 		try {
88
-			$this->miscService->log('New Search Request; SearchResult Model: ' . json_encode($searchResult), 0);
88
+			$this->miscService->log('New Search Request; SearchResult Model: '.json_encode($searchResult), 0);
89 89
 			$query = $this->searchMappingService->generateSearchQuery(
90 90
 				$searchResult->getRequest(), $access, $searchResult->getProvider()
91 91
 																   ->getId()
@@ -95,25 +95,25 @@  discard block
 block discarded – undo
95 95
 		}
96 96
 
97 97
 		try {
98
-			$this->miscService->log('Searching ES: ' . json_encode($query['params']), 0);
98
+			$this->miscService->log('Searching ES: '.json_encode($query['params']), 0);
99 99
 
100 100
 			$result = $client->search($query['params']);
101 101
 		} catch (Exception $e) {
102 102
 			$this->miscService->log(
103
-				'debug - request: ' . json_encode($searchResult->getRequest()) . '   - query: '
103
+				'debug - request: '.json_encode($searchResult->getRequest()).'   - query: '
104 104
 				. json_encode($query)
105 105
 			);
106 106
 			throw $e;
107 107
 		}
108 108
 
109
-		$this->miscService->log('Result from ES: ' . json_encode($result), 0);
109
+		$this->miscService->log('Result from ES: '.json_encode($result), 0);
110 110
 		$this->updateSearchResult($searchResult, $result);
111 111
 
112 112
 		foreach ($result['hits']['hits'] as $entry) {
113 113
 			$searchResult->addDocument($this->parseSearchEntry($entry, $access->getViewerId()));
114 114
 		}
115 115
 
116
-		$this->miscService->log('Filled SearchResult Model: ' . json_encode($searchResult), 0);
116
+		$this->miscService->log('Filled SearchResult Model: '.json_encode($searchResult), 0);
117 117
 	}
118 118
 
119 119
 
Please login to merge, or discard this patch.
lib/Platform/ElasticSearchPlatform.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -126,12 +126,12 @@
 block discarded – undo
126 126
 		$hosts = $this->configService->getElasticHost();
127 127
 		foreach ($hosts as $host) {
128 128
 			$parsedHost = parse_url($host);
129
-			$safeHost = $parsedHost['scheme'] . '://';
129
+			$safeHost = $parsedHost['scheme'].'://';
130 130
 			if (array_key_exists('user', $parsedHost)) {
131
-				$safeHost .= $parsedHost['user'] . ':' . '********' . '@';
131
+				$safeHost .= $parsedHost['user'].':'.'********'.'@';
132 132
 			}
133 133
 			$safeHost .= $parsedHost['host'];
134
-			$safeHost .= ':' . $parsedHost['port'];
134
+			$safeHost .= ':'.$parsedHost['port'];
135 135
 
136 136
 			$sanitizedHosts[] = $safeHost;
137 137
 		}
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
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
 			'index' =>
79 79
 				[
80 80
 					'index' => $this->configService->getElasticIndex(),
81
-					'id'    => $document->getProviderId() . ':' . $document->getId(),
81
+					'id'    => $document->getProviderId().':'.$document->getId(),
82 82
 					'type'  => $this->configService->getElasticType(),
83 83
 					'body'  => $this->generateIndexBody($document)
84 84
 				]
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
 			'index' =>
104 104
 				[
105 105
 					'index' => $this->configService->getElasticIndex(),
106
-					'id'    => $document->getProviderId() . ':' . $document->getId(),
106
+					'id'    => $document->getProviderId().':'.$document->getId(),
107 107
 					'type'  => $this->configService->getElasticType(),
108 108
 					'body'  => ['doc' => $this->generateIndexBody($document)]
109 109
 				]
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
 			'index' =>
131 131
 				[
132 132
 					'index' => $this->configService->getElasticIndex(),
133
-					'id'    => $providerId . ':' . $documentId,
133
+					'id'    => $providerId.':'.$documentId,
134 134
 					'type'  => $this->configService->getElasticType()
135 135
 				]
136 136
 		];
Please login to merge, or discard this patch.
lib/Service/SearchMappingService.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -288,7 +288,7 @@  discard block
 block discarded – undo
288 288
 
289 289
 		foreach ($request->getWildcardFields() as $field) {
290 290
 			if (!$this->fieldIsOutLimit($request, $field)) {
291
-				$queryFields[] = ['wildcard' => [$field => '*' . $content->getWord() . '*']];
291
+				$queryFields[] = ['wildcard' => [$field => '*'.$content->getWord().'*']];
292 292
 			}
293 293
 		}
294 294
 
@@ -456,7 +456,7 @@  discard block
 block discarded – undo
456 456
 		return [
457 457
 			'index' => $this->configService->getElasticIndex(),
458 458
 			'type'  => $this->configService->getElasticType(),
459
-			'id'    => $providerId . ':' . $documentId
459
+			'id'    => $providerId.':'.$documentId
460 460
 		];
461 461
 	}
462 462
 
@@ -469,7 +469,7 @@  discard block
 block discarded – undo
469 469
 	private function getPartsFields(ISearchRequest $request) {
470 470
 		return array_map(
471 471
 			function($value) {
472
-				return 'parts.' . $value;
472
+				return 'parts.'.$value;
473 473
 			}, $request->getParts()
474 474
 		);
475 475
 	}
Please login to merge, or discard this patch.