@@ -84,6 +84,9 @@ discard block |
||
84 | 84 | public $contentEncoded; |
85 | 85 | |
86 | 86 | |
87 | + /** |
|
88 | + * @param string $id |
|
89 | + */ |
|
87 | 90 | public function __construct($providerId, $id) { |
88 | 91 | $this->providerId = $providerId; |
89 | 92 | $this->id = $id; |
@@ -424,7 +427,7 @@ discard block |
||
424 | 427 | } |
425 | 428 | |
426 | 429 | /** |
427 | - * @param $excerpt |
|
430 | + * @param string $excerpt |
|
428 | 431 | * |
429 | 432 | * @return mixed |
430 | 433 | */ |
@@ -281,7 +281,7 @@ |
||
281 | 281 | foreach ($ak as $source) { |
282 | 282 | $tags = $this->subTags[$source]; |
283 | 283 | foreach ($tags as $tag) { |
284 | - $subTags[] = $source . '_' . $tag; |
|
284 | + $subTags[] = $source.'_'.$tag; |
|
285 | 285 | } |
286 | 286 | } |
287 | 287 |
@@ -73,7 +73,7 @@ |
||
73 | 73 | |
74 | 74 | /** |
75 | 75 | * @param string $panelId |
76 | - * @param array $lines |
|
76 | + * @param string[] $lines |
|
77 | 77 | */ |
78 | 78 | public function createPanel($panelId, $lines) { |
79 | 79 | if (!is_array($lines)) { |
@@ -182,7 +182,7 @@ |
||
182 | 182 | } |
183 | 183 | } |
184 | 184 | |
185 | - $this->display->setFormat(implode("\n", $format) . "\n"); |
|
185 | + $this->display->setFormat(implode("\n", $format)."\n"); |
|
186 | 186 | $this->refreshInfo(); |
187 | 187 | $this->display->start(); |
188 | 188 | } |
@@ -364,7 +364,7 @@ |
||
364 | 364 | * @param IndexDocument $document |
365 | 365 | * |
366 | 366 | * @return |
367 | - * @throws Exception |
|
367 | + Index @throws Exception |
|
368 | 368 | */ |
369 | 369 | public function indexDocument( |
370 | 370 | IFullTextSearchPlatform $platform, IFullTextSearchProvider $provider, $document |
@@ -149,7 +149,7 @@ |
||
149 | 149 | public function indexProviderContentFromUser( |
150 | 150 | IFullTextSearchPlatform $platform, IFullTextSearchProvider $provider, $userId, $options |
151 | 151 | ) { |
152 | - $this->updateRunnerAction('generateIndex' . $provider->getName()); |
|
152 | + $this->updateRunnerAction('generateIndex'.$provider->getName()); |
|
153 | 153 | $this->updateRunnerInfoArray( |
154 | 154 | [ |
155 | 155 | 'userId' => $userId, |
@@ -181,8 +181,8 @@ discard block |
||
181 | 181 | */ |
182 | 182 | private function limitToDBField(IQueryBuilder &$qb, $field, $values) { |
183 | 183 | $expr = $qb->expr(); |
184 | - $pf = ($qb->getType() === QueryBuilder::SELECT) ? $this->defaultSelectAlias . '.' : ''; |
|
185 | - $field = $pf . $field; |
|
184 | + $pf = ($qb->getType() === QueryBuilder::SELECT) ? $this->defaultSelectAlias.'.' : ''; |
|
185 | + $field = $pf.$field; |
|
186 | 186 | |
187 | 187 | if (!is_array($values)) { |
188 | 188 | $values = [$values]; |
@@ -202,8 +202,8 @@ discard block |
||
202 | 202 | */ |
203 | 203 | protected function limitToQueuedIndexes(IQueryBuilder &$qb) { |
204 | 204 | $expr = $qb->expr(); |
205 | - $pf = ($qb->getType() === QueryBuilder::SELECT) ? $this->defaultSelectAlias . '.' : ''; |
|
206 | - $qb->andWhere($expr->neq($pf . 'status', $qb->createNamedParameter(Index::INDEX_OK))); |
|
205 | + $pf = ($qb->getType() === QueryBuilder::SELECT) ? $this->defaultSelectAlias.'.' : ''; |
|
206 | + $qb->andWhere($expr->neq($pf.'status', $qb->createNamedParameter(Index::INDEX_OK))); |
|
207 | 207 | } |
208 | 208 | |
209 | 209 | } |
@@ -235,7 +235,7 @@ discard block |
||
235 | 235 | } |
236 | 236 | |
237 | 237 | if ($color !== '') { |
238 | - $this->info[$info . 'Colored'] = '<' . $color . '>' . $value . '</' . $color . '>'; |
|
238 | + $this->info[$info.'Colored'] = '<'.$color.'>'.$value.'</'.$color.'>'; |
|
239 | 239 | } |
240 | 240 | |
241 | 241 | |
@@ -346,7 +346,7 @@ discard block |
||
346 | 346 | return; |
347 | 347 | } |
348 | 348 | |
349 | - $this->setInfo('_memory', round((memory_get_usage() / 1024 / 1024)) . ' MB'); |
|
349 | + $this->setInfo('_memory', round((memory_get_usage() / 1024 / 1024)).' MB'); |
|
350 | 350 | $this->ramTick = $tick; |
351 | 351 | } |
352 | 352 | |
@@ -358,7 +358,7 @@ discard block |
||
358 | 358 | */ |
359 | 359 | public function exception($reason, $stop) { |
360 | 360 | if (!$stop) { |
361 | - $this->output('Exception: ' . $reason); |
|
361 | + $this->output('Exception: '.$reason); |
|
362 | 362 | // TODO: feed an array of exceptions for log; |
363 | 363 | } |
364 | 364 | $this->runningService->exception($this->tickId, $reason, $stop); |
@@ -278,7 +278,7 @@ discard block |
||
278 | 278 | } |
279 | 279 | |
280 | 280 | /** |
281 | - * @param $key |
|
281 | + * @param string $key |
|
282 | 282 | */ |
283 | 283 | public function keyPressed($key) { |
284 | 284 | foreach ($this->methodOnKeyPress as $method) { |
@@ -371,7 +371,7 @@ discard block |
||
371 | 371 | |
372 | 372 | |
373 | 373 | /** |
374 | - * @param $tick |
|
374 | + * @param integer $tick |
|
375 | 375 | */ |
376 | 376 | private function updateTick($tick) { |
377 | 377 | if (($this->ramTick + self::MEMORY_INFO_UPDATE) > $tick) { |
@@ -386,8 +386,8 @@ discard block |
||
386 | 386 | /** |
387 | 387 | * @deprecated - verifier l'interet !? |
388 | 388 | * |
389 | - * @param $reason |
|
390 | - * @param $stop |
|
389 | + * @param string $reason |
|
390 | + * @param boolean $stop |
|
391 | 391 | */ |
392 | 392 | public function exception($reason, $stop) { |
393 | 393 | if (!$stop) { |
@@ -514,7 +514,7 @@ discard block |
||
514 | 514 | $index = $result['index']; |
515 | 515 | $resultIndex = ''; |
516 | 516 | if ($index !== null) { |
517 | - $resultIndex = $index->getProviderId() . ':' . $index->getDocumentId(); |
|
517 | + $resultIndex = $index->getProviderId().':'.$index->getDocumentId(); |
|
518 | 518 | } |
519 | 519 | |
520 | 520 | |
@@ -571,7 +571,7 @@ discard block |
||
571 | 571 | $index = $error['index']; |
572 | 572 | $errorIndex = ''; |
573 | 573 | if ($index !== null) { |
574 | - $errorIndex = $index->getProviderId() . ':' . $index->getDocumentId(); |
|
574 | + $errorIndex = $index->getProviderId().':'.$index->getDocumentId(); |
|
575 | 575 | } |
576 | 576 | |
577 | 577 | $width = $this->terminal->getWidth() - 13; |
@@ -592,7 +592,7 @@ discard block |
||
592 | 592 | $index = $error['index']; |
593 | 593 | $errorIndex = ''; |
594 | 594 | if ($index !== null) { |
595 | - $errorIndex = $index->getProviderId() . ':' . $index->getDocumentId(); |
|
595 | + $errorIndex = $index->getProviderId().':'.$index->getDocumentId(); |
|
596 | 596 | } |
597 | 597 | |
598 | 598 | $width = $this->terminal->getWidth() - 13; |
@@ -644,7 +644,7 @@ discard block |
||
644 | 644 | $index = $result['index']; |
645 | 645 | $resultIndex = ''; |
646 | 646 | if ($index !== null) { |
647 | - $resultIndex = $index->getProviderId() . ':' . $index->getDocumentId(); |
|
647 | + $resultIndex = $index->getProviderId().':'.$index->getDocumentId(); |
|
648 | 648 | } |
649 | 649 | |
650 | 650 |