From 34d193d36e860e402e9e892bc17ee806e9770a64 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20Pineau?= Date: Fri, 15 Mar 2024 14:21:01 +0100 Subject: [PATCH] chore: fix phpstan issue --- src/IndexBuilder.php | 3 --- src/Indexer.php | 24 ------------------------ 2 files changed, 27 deletions(-) diff --git a/src/IndexBuilder.php b/src/IndexBuilder.php index 3c5b056..470bb39 100644 --- a/src/IndexBuilder.php +++ b/src/IndexBuilder.php @@ -112,9 +112,6 @@ public function migrate(Index $currentIndex, array $params = [], array $context return $newIndex; } - /** - * @throws ExceptionInterface - */ public function purgeOldIndices(string $indexName, bool $dryRun = false): array { $indexName = $this->indexNameMapper->getPrefixedIndex($indexName); diff --git a/src/Indexer.php b/src/Indexer.php index 506779b..7fa08e3 100644 --- a/src/Indexer.php +++ b/src/Indexer.php @@ -41,9 +41,6 @@ public function __construct(Client $client, SerializerInterface $serializer, int $this->contextBuilder = $contextBuilder ?? new StaticContextBuilder(); } - /** - * @throws ExceptionInterface - */ public function scheduleIndex($index, ElasticaDocument $document) { $document->setIndex($index instanceof Index ? $index->getName() : $index); @@ -54,9 +51,6 @@ public function scheduleIndex($index, ElasticaDocument $document) $this->flushIfNeeded(); } - /** - * @throws ExceptionInterface - */ public function scheduleDelete($index, string $id) { $document = new Document($id); @@ -66,9 +60,6 @@ public function scheduleDelete($index, string $id) $this->flushIfNeeded(); } - /** - * @throws ExceptionInterface - */ public function scheduleUpdate($index, ElasticaDocument $document) { $document->setIndex($index instanceof Index ? $index->getName() : $index); @@ -79,9 +70,6 @@ public function scheduleUpdate($index, ElasticaDocument $document) $this->flushIfNeeded(); } - /** - * @throws ExceptionInterface - */ public function scheduleCreate($index, ElasticaDocument $document) { $document->setIndex($index instanceof Index ? $index->getName() : $index); @@ -92,9 +80,6 @@ public function scheduleCreate($index, ElasticaDocument $document) $this->flushIfNeeded(); } - /** - * @throws ExceptionInterface - */ public function flush(): ?Bulk\ResponseSet { if (!$this->currentBulk) { @@ -123,9 +108,6 @@ public function getQueueSize() return \count($this->currentBulk->getActions()); } - /** - * @throws ExceptionInterface - */ public function refresh($index) { $indexName = $index instanceof Index ? $index->getName() : $index; @@ -133,9 +115,6 @@ public function refresh($index) $this->client->getIndex($indexName)->refresh(); } - /** - * @throws ExceptionInterface - */ public function setBulkMaxSize(int $bulkMaxSize): void { $this->bulkMaxSize = $bulkMaxSize; @@ -166,9 +145,6 @@ protected function getCurrentBulk(): Bulk return $this->currentBulk; } - /** - * @throws ExceptionInterface - */ protected function flushIfNeeded(): void { if ($this->getQueueSize() >= $this->bulkMaxSize) {