Completed
Pull Request — master (#759)
by Maxence
16s
created
lib/Tools/Traits/TDeserialize.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -68,11 +68,11 @@
 block discarded – undo
68 68
 		try {
69 69
 			$test = new ReflectionClass($class);
70 70
 		} catch (\ReflectionException $e) {
71
-			throw new InvalidItemException('cannot ReflectionClass ' . $class);
71
+			throw new InvalidItemException('cannot ReflectionClass '.$class);
72 72
 		}
73 73
 
74 74
 		if (!in_array(IDeserializable::class, $test->getInterfaceNames())) {
75
-			throw new InvalidItemException($class . ' does not implement IDeserializable');
75
+			throw new InvalidItemException($class.' does not implement IDeserializable');
76 76
 		}
77 77
 
78 78
 		/** @var IDeserializable $item */
Please login to merge, or discard this patch.
lib/AppInfo/Application.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
 use Symfony\Component\Routing\Exception\RouteNotFoundException;
52 52
 use Throwable;
53 53
 
54
-require_once __DIR__ . '/../../vendor/autoload.php';
54
+require_once __DIR__.'/../../vendor/autoload.php';
55 55
 
56 56
 
57 57
 class Application extends App implements IBootstrap {
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
139 139
 		return [
140 140
 			'id' => self::APP_ID,
141 141
 			'order' => 5,
142
-			'href' => $urlGen->linkToRoute(self::APP_ID . '.Navigation.navigate'),
142
+			'href' => $urlGen->linkToRoute(self::APP_ID.'.Navigation.navigate'),
143 143
 			'icon' => $urlGen->imagePath(self::APP_ID, 'fulltextsearch.svg'),
144 144
 			'name' => 'Search'
145 145
 		];
Please login to merge, or discard this patch.
lib/Service/CliService.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
 	 */
138 138
 	public function switchPanel(string $panelSlot, string $panelId) {
139 139
 		$this->displayedPanel = array_map(
140
-			function ($item) use ($panelId, $panelSlot) {
140
+			function($item) use ($panelId, $panelSlot) {
141 141
 				if ($item['slot'] === $panelSlot) {
142 142
 					$item['id'] = $panelId;
143 143
 				}
@@ -195,7 +195,7 @@  discard block
 block discarded – undo
195 195
 			}
196 196
 		}
197 197
 
198
-		$this->display->setFormat(implode("\n", $format) . "\n");
198
+		$this->display->setFormat(implode("\n", $format)."\n");
199 199
 		$this->refreshInfo();
200 200
 		$this->display->start();
201 201
 	}
Please login to merge, or discard this patch.
lib/Command/CollectionInit.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -117,7 +117,7 @@
 block discarded – undo
117 117
 
118 118
 		$this->cliService->createPanel(
119 119
 			'collection', [
120
-				'┌─ Collection ' . $collection . ' ────',
120
+				'┌─ Collection '.$collection.' ────',
121 121
 				'│ ProviderId, UserId: <info>%providerId%</info> / <info>%userId%</info>',
122 122
 				'│ Chunk: <info>%chunkCurr:3s%</info>/<info>%chunkTotal%</info>',
123 123
 				'│ Document: <info>%documentCurr:6s%</info>/<info>%documentChunk%</info>',
Please login to merge, or discard this patch.
lib/Command/Test.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -218,7 +218,7 @@  discard block
 block discarded – undo
218 218
 			$output->write(' ', true);
219 219
 		}
220 220
 
221
-		$output->write($line . ' ', false);
221
+		$output->write($line.' ', false);
222 222
 	}
223 223
 
224 224
 
@@ -279,7 +279,7 @@  discard block
 block discarded – undo
279 279
 		$testProvider->setIndexOptions(new IndexOptions());
280 280
 		$indexableDocuments =
281 281
 			$testProvider->generateIndexableDocuments(TestService::DOCUMENT_USER1, '');
282
-		$this->output($output, '(' . sizeof($indexableDocuments) . ' items)', false);
282
+		$this->output($output, '('.sizeof($indexableDocuments).' items)', false);
283 283
 		$this->outputResult($output, true);
284 284
 	}
285 285
 
@@ -295,12 +295,12 @@  discard block
 block discarded – undo
295 295
 		$wrapper = $this->platformService->getPlatform();
296 296
 		$testPlatform = $wrapper->getPlatform();
297 297
 
298
-		$this->output($output, '(' . $testPlatform->getName() . ')', false);
298
+		$this->output($output, '('.$testPlatform->getName().')', false);
299 299
 		$this->outputResult($output, true);
300 300
 
301 301
 		$this->output($output, 'Testing search platform.');
302 302
 		if (!$testPlatform->testPlatform()) {
303
-			throw new Exception('Search platform (' . $testPlatform->getName() . ') down ?');
303
+			throw new Exception('Search platform ('.$testPlatform->getName().') down ?');
304 304
 		}
305 305
 		$this->outputResult($output, true);
306 306
 
@@ -397,13 +397,13 @@  discard block
 block discarded – undo
397 397
 			);
398 398
 
399 399
 			$this->output(
400
-				$output, '(size: ' . $indexDocument->getContentSize() . ')', false
400
+				$output, '(size: '.$indexDocument->getContentSize().')', false
401 401
 			);
402 402
 			$this->outputResult($output, true);
403 403
 		} catch (Exception $e) {
404 404
 			throw new Exception(
405
-				"Issue while getting test document '" . TestService::DOCUMENT_TYPE_LICENSE
406
-				. "' from search platform: " . $e->getMessage()
405
+				"Issue while getting test document '".TestService::DOCUMENT_TYPE_LICENSE
406
+				. "' from search platform: ".$e->getMessage()
407 407
 			);
408 408
 		}
409 409
 
@@ -593,7 +593,7 @@  discard block
 block discarded – undo
593 593
 	) {
594 594
 		$this->output(
595 595
 			$output,
596
-			" - '" . $search . "'" . (($moreOutput === '') ? '' : ' - ' . $moreOutput . ' - ')
596
+			" - '".$search."'".(($moreOutput === '') ? '' : ' - '.$moreOutput.' - ')
597 597
 		);
598 598
 		$request = new SearchRequest();
599 599
 
@@ -607,7 +607,7 @@  discard block
 block discarded – undo
607 607
 
608 608
 		$this->output(
609 609
 			$output,
610
-			'(result: ' . $searchResult->getCount() . ', expected: ' . json_encode($expected) . ')',
610
+			'(result: '.$searchResult->getCount().', expected: '.json_encode($expected).')',
611 611
 			false
612 612
 		);
613 613
 		$this->compareSearchResult($searchResult, $expected);
@@ -671,12 +671,12 @@  discard block
 block discarded – undo
671 671
 	private function compareSearchResult(SearchResult $searchResult, array $entries) {
672 672
 		$documents = $searchResult->getDocuments();
673 673
 		if (sizeof($documents) !== sizeof($entries)) {
674
-			throw new Exception('Unexpected SearchResult: ' . json_encode($searchResult));
674
+			throw new Exception('Unexpected SearchResult: '.json_encode($searchResult));
675 675
 		}
676 676
 
677 677
 		foreach ($documents as $document) {
678 678
 			if (!in_array($document->getId(), $entries)) {
679
-				throw new Exception('Unexpected Document: ' . json_encode($document));
679
+				throw new Exception('Unexpected Document: '.json_encode($document));
680 680
 			}
681 681
 		}
682 682
 	}
@@ -689,7 +689,7 @@  discard block
 block discarded – undo
689 689
 	 * @throws InterruptException
690 690
 	 */
691 691
 	private function pause(OutputInterface $output, int $s) {
692
-		$this->output($output, 'Pausing ' . $s . ' seconds');
692
+		$this->output($output, 'Pausing '.$s.' seconds');
693 693
 
694 694
 		for ($i = 1; $i <= $s; $i++) {
695 695
 			if (time_nanosleep(1, 0) !== true) {
Please login to merge, or discard this patch.
lib/Command/Index.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -222,11 +222,11 @@  discard block
 block discarded – undo
222 222
 			/** do not get stuck while waiting interactive input */
223 223
 			try {
224 224
 				readline_callback_handler_install(
225
-					'', function () {
225
+					'', function() {
226 226
 					}
227 227
 				);
228 228
 			} catch (Throwable $t) {
229
-				$this->miscService->log($t->getMessage() . ' -- ' . $t->getTraceAsString());
229
+				$this->miscService->log($t->getMessage().' -- '.$t->getTraceAsString());
230 230
 				throw new Exception('Please install php-readline, or use --no-readline');
231 231
 			}
232 232
 		}
@@ -642,7 +642,7 @@  discard block
 block discarded – undo
642 642
 		$index = $error['index'];
643 643
 		$errorIndex = '';
644 644
 		if ($index !== null) {
645
-			$errorIndex = $index->getProviderId() . ':' . $index->getDocumentId();
645
+			$errorIndex = $index->getProviderId().':'.$index->getDocumentId();
646 646
 		}
647 647
 
648 648
 		$width = $this->terminal->getWidth() - 13;
@@ -694,7 +694,7 @@  discard block
 block discarded – undo
694 694
 		$index = $result['index'];
695 695
 		$resultIndex = '';
696 696
 		if ($index !== null) {
697
-			$resultIndex = $index->getProviderId() . ':' . $index->getDocumentId();
697
+			$resultIndex = $index->getProviderId().':'.$index->getDocumentId();
698 698
 		}
699 699
 
700 700
 
Please login to merge, or discard this patch.
lib/Command/Live.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -217,7 +217,7 @@  discard block
 block discarded – undo
217 217
 			try {
218 218
 				/** do not get stuck while waiting interactive input */
219 219
 				readline_callback_handler_install(
220
-					'', function () {
220
+					'', function() {
221 221
 					}
222 222
 				);
223 223
 			} catch (Throwable $t) {
@@ -261,7 +261,7 @@  discard block
 block discarded – undo
261 261
 
262 262
 			} catch (Exception $e) {
263 263
 				$this->miscService->log(
264
-					'Exception while live index: ' . get_class($e) . ' - ' . $e->getMessage()
264
+					'Exception while live index: '.get_class($e).' - '.$e->getMessage()
265 265
 				);
266 266
 
267 267
 				if (!$input->getOption('service')) {
@@ -562,7 +562,7 @@  discard block
 block discarded – undo
562 562
 		$index = $result['index'];
563 563
 		$resultIndex = '';
564 564
 		if ($index !== null) {
565
-			$resultIndex = $index->getProviderId() . ':' . $index->getDocumentId();
565
+			$resultIndex = $index->getProviderId().':'.$index->getDocumentId();
566 566
 		}
567 567
 
568 568
 
@@ -620,7 +620,7 @@  discard block
 block discarded – undo
620 620
 		$index = $error['index'];
621 621
 		$errorIndex = '';
622 622
 		if ($index !== null) {
623
-			$errorIndex = $index->getProviderId() . ':' . $index->getDocumentId();
623
+			$errorIndex = $index->getProviderId().':'.$index->getDocumentId();
624 624
 		}
625 625
 
626 626
 		$width = $this->terminal->getWidth() - 13;
Please login to merge, or discard this patch.