Completed
Push — master ( 9e87bf...d0a64a )
by Maxence
02:56
created
lib/Service/ProviderService.php 2 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -214,6 +214,9 @@
 block discarded – undo
214 214
 	}
215 215
 
216 216
 
217
+	/**
218
+	 * @param boolean $boolean
219
+	 */
217 220
 	public function setProviderAsIndexed(IFullTextSearchProvider $provider, $boolean) {
218 221
 		$this->configService->setProviderOptions(
219 222
 			$provider->getId(), ConfigService::PROVIDER_INDEXED, (($boolean) ? '1' : '0')
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
 		$provider = \OC::$server->query((string)$providerId);
107 107
 		if (!($provider instanceof IFullTextSearchProvider)) {
108 108
 			throw new ProviderIsNotCompatibleException(
109
-				$providerId . ' is not a compatible IFullTextSearchProvider'
109
+				$providerId.' is not a compatible IFullTextSearchProvider'
110 110
 			);
111 111
 		}
112 112
 
@@ -187,7 +187,7 @@  discard block
 block discarded – undo
187 187
 			}
188 188
 		}
189 189
 
190
-		throw new ProviderDoesNotExistException('Provider \'' . $providerId . '\' does not exist');
190
+		throw new ProviderDoesNotExistException('Provider \''.$providerId.'\' does not exist');
191 191
 	}
192 192
 
193 193
 
@@ -272,7 +272,7 @@  discard block
 block discarded – undo
272 272
 		foreach ($this->providers AS $knownProvider) {
273 273
 			if ($knownProvider->getId() === $provider->getId()) {
274 274
 				throw new ProviderIsNotUniqueException(
275
-					'FullTextSearchProvider ' . $provider->getId() . ' already exist'
275
+					'FullTextSearchProvider '.$provider->getId().' already exist'
276 276
 				);
277 277
 			}
278 278
 		}
Please login to merge, or discard this patch.
lib/Command/Search.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -105,13 +105,13 @@
 block discarded – undo
105 105
 
106 106
 	private function displaySearchResult(SearchResult $searchResult) {
107 107
 
108
-		echo '> ' . $searchResult->getProvider()
109
-								 ->getName() . "\n";
108
+		echo '> '.$searchResult->getProvider()
109
+								 ->getName()."\n";
110 110
 
111 111
 		/** @var IndexDocument[] $result */
112 112
 		$result = $searchResult->getDocuments();
113 113
 		foreach ($result as $document) {
114
-			echo ' - ' . $document->getId() . ' score:' . $document->getScore() . "\n";
114
+			echo ' - '.$document->getId().' score:'.$document->getScore()."\n";
115 115
 		}
116 116
 	}
117 117
 
Please login to merge, or discard this patch.
lib/Service/RunningService.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -224,18 +224,18 @@
 block discarded – undo
224 224
 		$preAction = $tick->getAction();
225 225
 
226 226
 		if ($preAction !== '') {
227
-			$preActionTotal = $tick->getInfo($preAction . 'Total', 0);
228
-			$preActionStart = $tick->getInfo($preAction . 'Init', 0);
227
+			$preActionTotal = $tick->getInfo($preAction.'Total', 0);
228
+			$preActionStart = $tick->getInfo($preAction.'Init', 0);
229 229
 
230 230
 			if ($preActionStart > 0) {
231 231
 
232 232
 				$preActionTotal += ($now - $preActionStart);
233
-				$tick->setInfo($preAction . 'Total', $preActionTotal);
234
-				$tick->unsetInfo($preAction . 'Init');
233
+				$tick->setInfo($preAction.'Total', $preActionTotal);
234
+				$tick->unsetInfo($preAction.'Init');
235 235
 			}
236 236
 		}
237 237
 		$tick->setAction($action)
238
-			 ->setInfo($action . 'Init', $now);
238
+			 ->setInfo($action.'Init', $now);
239 239
 	}
240 240
 
241 241
 
Please login to merge, or discard this patch.
lib/Service/SearchService.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -184,7 +184,7 @@
 block discarded – undo
184 184
 			try {
185 185
 				$rights->setCircles(Circles::joinedCircleIds($user->getUID()));
186 186
 			} catch (Exception $e) {
187
-				$this->miscService->log('Circles is set as enabled but: ' . $e->getMessage());
187
+				$this->miscService->log('Circles is set as enabled but: '.$e->getMessage());
188 188
 			}
189 189
 		}
190 190
 
Please login to merge, or discard this patch.
lib/Service/PlatformService.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -159,7 +159,7 @@  discard block
 block discarded – undo
159 159
 		$platform = \OC::$server->query((string)$selected);
160 160
 		if (!($platform instanceof IFullTextSearchPlatform)) {
161 161
 			throw new PlatformIsNotCompatibleException(
162
-				$selected . ' is not a compatible FullTextSearchPlatform'
162
+				$selected.' is not a compatible FullTextSearchPlatform'
163 163
 			);
164 164
 		}
165 165
 
@@ -182,7 +182,7 @@  discard block
 block discarded – undo
182 182
 
183 183
 		if (!in_array($selected, $this->platforms)) {
184 184
 			throw new PlatformDoesNotExistException(
185
-				'FullTextSearchPlatform ' . $selected . ' is not available'
185
+				'FullTextSearchPlatform '.$selected.' is not available'
186 186
 			);
187 187
 		}
188 188
 
Please login to merge, or discard this patch.
lib/Model/Index.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -129,7 +129,7 @@
 block discarded – undo
129 129
 	/**
130 130
 	 * @param int $status
131 131
 	 *
132
-	 * @return bool
132
+	 * @return integer
133 133
 	 */
134 134
 	public function isStatus($status) {
135 135
 		return ((int)$status & $this->getStatus());
Please login to merge, or discard this patch.
lib/Command/Check.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
 		}
104 104
 
105 105
 		$output->writeln(
106
-			'Full text search ' . $this->configService->getAppValue('installed_version')
106
+			'Full text search '.$this->configService->getAppValue('installed_version')
107 107
 		);
108 108
 		$output->writeln(' ');
109 109
 
@@ -173,7 +173,7 @@  discard block
 block discarded – undo
173 173
 
174 174
 		$output->writeln('- Search Platform:');
175 175
 
176
-		$output->writeln($platform->getName() . ' ' . $platform->getVersion());
176
+		$output->writeln($platform->getName().' '.$platform->getVersion());
177 177
 		echo json_encode($platform->getConfiguration(), JSON_PRETTY_PRINT);
178 178
 
179 179
 		$output->writeln(' ');
@@ -198,7 +198,7 @@  discard block
 block discarded – undo
198 198
 		$output->writeln('- Content Providers:');
199 199
 
200 200
 		foreach ($providers as $provider) {
201
-			$output->writeln($provider->getName() . ' ' . $provider->getVersion());
201
+			$output->writeln($provider->getName().' '.$provider->getVersion());
202 202
 			echo json_encode($provider->getConfiguration(), JSON_PRETTY_PRINT);
203 203
 			$output->writeln('');
204 204
 		}
Please login to merge, or discard this patch.
lib/Model/SearchRequest.php 2 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -212,8 +212,8 @@
 block discarded – undo
212 212
 	}
213 213
 
214 214
 	/**
215
-	 * @param $key
216
-	 * @param $value
215
+	 * @param string $key
216
+	 * @param string $value
217 217
 	 *
218 218
 	 * @return $this
219 219
 	 */
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -169,7 +169,7 @@  discard block
 block discarded – undo
169 169
 
170 170
 		$options = ['is', 'show'];
171 171
 		if (in_array($kw, $options)) {
172
-			$this->addOption($kw . '_' . $value, '1');
172
+			$this->addOption($kw.'_'.$value, '1');
173 173
 
174 174
 			return true;
175 175
 		}
@@ -422,7 +422,7 @@  discard block
 block discarded – undo
422 422
 		foreach ($ak as $source) {
423 423
 			$tags = $this->subTags[$source];
424 424
 			foreach ($tags as $tag) {
425
-				$subTags[] = $source . '_' . $tag;
425
+				$subTags[] = $source.'_'.$tag;
426 426
 			}
427 427
 		}
428 428
 
Please login to merge, or discard this patch.
lib/Command/Test.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -210,7 +210,7 @@
 block discarded – undo
210 210
 
211 211
 	/**
212 212
 	 * @param string|bool $line
213
-	 * @param $isNewLine
213
+	 * @param boolean $isNewLine
214 214
 	 *
215 215
 	 * @return string
216 216
 	 */
Please login to merge, or discard this patch.
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -204,7 +204,7 @@  discard block
 block discarded – undo
204 204
 			$output->write(' ', true);
205 205
 		}
206 206
 
207
-		$output->write($line . ' ', false);
207
+		$output->write($line.' ', false);
208 208
 	}
209 209
 
210 210
 
@@ -254,7 +254,7 @@  discard block
 block discarded – undo
254 254
 		$this->output($output, 'Testing mocked provider: get indexable documents.');
255 255
 		$indexableDocuments =
256 256
 			$testProvider->generateIndexableDocuments(TestService::DOCUMENT_USER1);
257
-		$this->output($output, '(' . sizeof($indexableDocuments) . ' items)', false);
257
+		$this->output($output, '('.sizeof($indexableDocuments).' items)', false);
258 258
 		$this->output($output, true);
259 259
 	}
260 260
 
@@ -268,12 +268,12 @@  discard block
 block discarded – undo
268 268
 	private function testLoadingPlatform($output) {
269 269
 		$this->output($output, 'Loading search platform.');
270 270
 		$testPlatform = $this->platformService->getPlatform();
271
-		$this->output($output, '(' . $testPlatform->getName() . ')', false);
271
+		$this->output($output, '('.$testPlatform->getName().')', false);
272 272
 		$this->output($output, true);
273 273
 
274 274
 		$this->output($output, 'Testing search platform.');
275 275
 		if (!$testPlatform->testPlatform()) {
276
-			throw new Exception ('Search platform (' . $testPlatform->getName() . ') down ?');
276
+			throw new Exception('Search platform ('.$testPlatform->getName().') down ?');
277 277
 		}
278 278
 		$this->output($output, true);
279 279
 
@@ -369,13 +369,13 @@  discard block
 block discarded – undo
369 369
 			);
370 370
 
371 371
 			$this->output(
372
-				$output, '(size: ' . $indexDocument->getContentSize() . ')', false
372
+				$output, '(size: '.$indexDocument->getContentSize().')', false
373 373
 			);
374 374
 			$this->output($output, true);
375 375
 		} catch (Exception $e) {
376 376
 			throw new Exception(
377
-				"Issue while getting test document '" . TestService::DOCUMENT_TYPE_LICENSE
378
-				. "' from search platform: " . $e->getMessage()
377
+				"Issue while getting test document '".TestService::DOCUMENT_TYPE_LICENSE
378
+				. "' from search platform: ".$e->getMessage()
379 379
 			);
380 380
 		}
381 381
 
@@ -549,7 +549,7 @@  discard block
 block discarded – undo
549 549
 	) {
550 550
 		$this->output(
551 551
 			$output,
552
-			" - '" . $search . "'" . (($moreOutput === '') ? '' : ' - ' . $moreOutput . ' - ')
552
+			" - '".$search."'".(($moreOutput === '') ? '' : ' - '.$moreOutput.' - ')
553 553
 		);
554 554
 		$request = new SearchRequest();
555 555
 
@@ -557,7 +557,7 @@  discard block
 block discarded – undo
557 557
 		$searchResult = $testPlatform->searchDocuments($testProvider, $access, $request);
558 558
 		$this->output(
559 559
 			$output,
560
-			'(result: ' . $searchResult->getCount() . ', expected: ' . json_encode($expected) . ')',
560
+			'(result: '.$searchResult->getCount().', expected: '.json_encode($expected).')',
561 561
 			false
562 562
 		);
563 563
 		$this->compareSearchResult($searchResult, $expected);
@@ -621,12 +621,12 @@  discard block
 block discarded – undo
621 621
 	private function compareSearchResult(SearchResult $searchResult, $entries) {
622 622
 		$documents = $searchResult->getDocuments();
623 623
 		if (sizeof($documents) !== sizeof($entries)) {
624
-			throw new \Exception('Unexpected SearchResult: ' . json_encode($searchResult));
624
+			throw new \Exception('Unexpected SearchResult: '.json_encode($searchResult));
625 625
 		}
626 626
 
627 627
 		foreach ($documents as $document) {
628 628
 			if (!in_array($document->getId(), $entries)) {
629
-				throw new \Exception('Unexpected Document: ' . json_encode($document));
629
+				throw new \Exception('Unexpected Document: '.json_encode($document));
630 630
 			}
631 631
 		}
632 632
 	}
@@ -639,7 +639,7 @@  discard block
 block discarded – undo
639 639
 	 * @throws InterruptException
640 640
 	 */
641 641
 	private function pause(OutputInterface $output, $s) {
642
-		$this->output($output, 'Pausing ' . $s . ' seconds');
642
+		$this->output($output, 'Pausing '.$s.' seconds');
643 643
 
644 644
 		for ($i = 1; $i <= $s; $i++) {
645 645
 			if (time_nanosleep(1, 0) !== true) {
Please login to merge, or discard this patch.