@@ -67,7 +67,7 @@ discard block |
||
| 67 | 67 | 'index' => |
| 68 | 68 | [ |
| 69 | 69 | 'index' => $this->configService->getElasticIndex(), |
| 70 | - 'id' => $document->getProviderId() . ':' . $document->getId(), |
|
| 70 | + 'id' => $document->getProviderId().':'.$document->getId(), |
|
| 71 | 71 | 'body' => $this->generateIndexBody($document) |
| 72 | 72 | ] |
| 73 | 73 | ]; |
@@ -95,7 +95,7 @@ discard block |
||
| 95 | 95 | 'index' => |
| 96 | 96 | [ |
| 97 | 97 | 'index' => $this->configService->getElasticIndex(), |
| 98 | - 'id' => $document->getProviderId() . ':' . $document->getId(), |
|
| 98 | + 'id' => $document->getProviderId().':'.$document->getId(), |
|
| 99 | 99 | 'body' => ['doc' => $this->generateIndexBody($document)] |
| 100 | 100 | ] |
| 101 | 101 | ]; |
@@ -125,7 +125,7 @@ discard block |
||
| 125 | 125 | 'index' => |
| 126 | 126 | [ |
| 127 | 127 | 'index' => $this->configService->getElasticIndex(), |
| 128 | - 'id' => $providerId . ':' . $documentId, |
|
| 128 | + 'id' => $providerId.':'.$documentId, |
|
| 129 | 129 | ] |
| 130 | 130 | ]; |
| 131 | 131 | |
@@ -34,7 +34,7 @@ |
||
| 34 | 34 | use OCP\AppFramework\Bootstrap\IBootstrap; |
| 35 | 35 | use OCP\AppFramework\Bootstrap\IRegistrationContext; |
| 36 | 36 | |
| 37 | -require_once __DIR__ . '/../../vendor/autoload.php'; |
|
| 37 | +require_once __DIR__.'/../../vendor/autoload.php'; |
|
| 38 | 38 | |
| 39 | 39 | class Application extends App implements IBootstrap { |
| 40 | 40 | |
@@ -48,8 +48,7 @@ discard block |
||
| 48 | 48 | */ |
| 49 | 49 | class SearchMappingService { |
| 50 | 50 | |
| 51 | - public function __construct |
|
| 52 | - ( |
|
| 51 | + public function __construct( |
|
| 53 | 52 | private ConfigService $configService |
| 54 | 53 | ) { |
| 55 | 54 | } |
@@ -275,7 +274,7 @@ discard block |
||
| 275 | 274 | |
| 276 | 275 | foreach ($request->getWildcardFields() as $field) { |
| 277 | 276 | if (!$this->fieldIsOutLimit($request, $field)) { |
| 278 | - $queryFields[] = ['wildcard' => [$field => '*' . $content->getWord() . '*']]; |
|
| 277 | + $queryFields[] = ['wildcard' => [$field => '*'.$content->getWord().'*']]; |
|
| 279 | 278 | } |
| 280 | 279 | } |
| 281 | 280 | |
@@ -439,7 +438,7 @@ discard block |
||
| 439 | 438 | public function getDocumentQuery(string $providerId, string $documentId): array { |
| 440 | 439 | return [ |
| 441 | 440 | 'index' => $this->configService->getElasticIndex(), |
| 442 | - 'id' => $providerId . ':' . $documentId |
|
| 441 | + 'id' => $providerId.':'.$documentId |
|
| 443 | 442 | ]; |
| 444 | 443 | } |
| 445 | 444 | |
@@ -451,8 +450,8 @@ discard block |
||
| 451 | 450 | */ |
| 452 | 451 | private function getPartsFields(ISearchRequest $request): array { |
| 453 | 452 | return array_map( |
| 454 | - function (string $value): string { |
|
| 455 | - return 'parts.' . $value; |
|
| 453 | + function(string $value): string { |
|
| 454 | + return 'parts.'.$value; |
|
| 456 | 455 | }, $request->getParts() |
| 457 | 456 | ); |
| 458 | 457 | } |