Skip to content

Commit

Permalink
chore: fix phpstan issue
Browse files Browse the repository at this point in the history
  • Loading branch information
lyrixx committed Mar 15, 2024
1 parent 376a483 commit 34d193d
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 27 deletions.
3 changes: 0 additions & 3 deletions src/IndexBuilder.php
Expand Up @@ -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);
Expand Down
24 changes: 0 additions & 24 deletions src/Indexer.php
Expand Up @@ -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);
Expand All @@ -54,9 +51,6 @@ public function scheduleIndex($index, ElasticaDocument $document)
$this->flushIfNeeded();
}

/**
* @throws ExceptionInterface
*/
public function scheduleDelete($index, string $id)
{
$document = new Document($id);
Expand All @@ -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);
Expand All @@ -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);
Expand All @@ -92,9 +80,6 @@ public function scheduleCreate($index, ElasticaDocument $document)
$this->flushIfNeeded();
}

/**
* @throws ExceptionInterface
*/
public function flush(): ?Bulk\ResponseSet
{
if (!$this->currentBulk) {
Expand Down Expand Up @@ -123,19 +108,13 @@ public function getQueueSize()
return \count($this->currentBulk->getActions());
}

/**
* @throws ExceptionInterface
*/
public function refresh($index)
{
$indexName = $index instanceof Index ? $index->getName() : $index;

$this->client->getIndex($indexName)->refresh();
}

/**
* @throws ExceptionInterface
*/
public function setBulkMaxSize(int $bulkMaxSize): void
{
$this->bulkMaxSize = $bulkMaxSize;
Expand Down Expand Up @@ -166,9 +145,6 @@ protected function getCurrentBulk(): Bulk
return $this->currentBulk;
}

/**
* @throws ExceptionInterface
*/
protected function flushIfNeeded(): void
{
if ($this->getQueueSize() >= $this->bulkMaxSize) {
Expand Down

0 comments on commit 34d193d

Please sign in to comment.