Completed
Push — master ( 041562...041562 )
by Maxence
02:09 queued 01:08
created
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/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/Service/SearchMappingService.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -279,7 +279,7 @@  discard block
 block discarded – undo
279 279
 
280 280
 		foreach ($request->getWildcardFields() as $field) {
281 281
 			if (!$this->fieldIsOutLimit($request, $field)) {
282
-				$queryFields[] = ['wildcard' => [$field => '*' . $content->getWord() . '*']];
282
+				$queryFields[] = ['wildcard' => [$field => '*'.$content->getWord().'*']];
283 283
 			}
284 284
 		}
285 285
 
@@ -380,7 +380,7 @@  discard block
 block discarded – undo
380 380
 		return [
381 381
 			'index' => $this->configService->getElasticIndex(),
382 382
 			'type'  => 'standard',
383
-			'id'    => $providerId . ':' . $documentId
383
+			'id'    => $providerId.':'.$documentId
384 384
 		];
385 385
 	}
386 386
 
@@ -393,7 +393,7 @@  discard block
 block discarded – undo
393 393
 	private function getPartsFields(ISearchRequest $request) {
394 394
 		return array_map(
395 395
 			function($value) {
396
-				return 'parts.' . $value;
396
+				return 'parts.'.$value;
397 397
 			}, $request->getParts()
398 398
 		);
399 399
 	}
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/AppInfo/Application.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@
 block discarded – undo
37 37
 use OCP\AppFramework\Bootstrap\IRegistrationContext;
38 38
 
39 39
 
40
-require_once __DIR__ . '/../../vendor/autoload.php';
40
+require_once __DIR__.'/../../vendor/autoload.php';
41 41
 
42 42
 
43 43
 /**
Please login to merge, or discard this patch.