Skip to content

Commit

Permalink
CS
Browse files Browse the repository at this point in the history
  • Loading branch information
Toflar committed Dec 16, 2024
1 parent d1ebaac commit 25b5a38
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions integrations/symfony/src/Command/ReindexCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,23 @@ protected function execute(InputInterface $input, OutputInterface $output): int
$ui = new SymfonyStyle($input, $output);
/** @var string|null $engineName */
$engineName = $input->getOption('engine');
/** @var string|null $indexName */
$indexName = $input->getOption('index');
/** @var bool $drop */
$drop = $input->getOption('drop');
/** @var int $bulkSize */
$bulkSize = $input->getOption('bulk-size');
/** @var \DateTimeImmutable|null $dateTimeBoundary */
$dateTimeBoundary = $input->getOption('datetime-boundary') ? new \DateTimeImmutable((string) $input->getOption('datetime-boundary')) : null; // @phpstan-ignore-line
/** @var array<string> $identifiers */
$identifiers = \explode(',', (string) $input->getOption('identifiers')); // @phpstan-ignore-line

$reindexConfig = ReindexConfig::create()
->withIndex($input->getOption('index'))
->withBulkSize((int) $input->getOption('bulk-size'))
->withDropIndex((bool) $input->getOption('drop'))
->withDateTimeBoundary($input->getOption('datetime-boundary') ? new \DateTimeImmutable($input->getOption('datetime-boundary')) : null)
->withIdentifiers(\explode(',', (string) $input->getOption('identifiers')));
->withIndex($indexName)
->withBulkSize($bulkSize)
->withDropIndex($drop)
->withDateTimeBoundary($dateTimeBoundary)
->withIdentifiers($identifiers);

foreach ($this->engineRegistry->getEngines() as $name => $engine) {
if ($engineName && $engineName !== $name) {
Expand Down

0 comments on commit 25b5a38

Please sign in to comment.