Skip to content

Commit

Permalink
refactor: cleanup code
Browse files Browse the repository at this point in the history
  • Loading branch information
sitepark-veltrup committed Mar 21, 2024
1 parent b3925fd commit 7764bd6
Showing 1 changed file with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions src/Service/Indexer/InternalResourceIndexer.php
Original file line number Diff line number Diff line change
Expand Up @@ -168,21 +168,17 @@ private function indexTranslationSplittedResources(
TranslationSplitterResult $splitterResult
): void {

$managedIndices = $this->indexService->getManagedIndices();

$processId = uniqid('', true);

$index = $this->indexService->getIndex('');

if (count($splitterResult->getBases()) > 0) {
$this->indexResourcesPerLanguageIndex(
$processId,
$parameter,
'',
$index,
$splitterResult->getBases()
);
}
$this->indexResourcesPerLanguageIndex(
$processId,
$parameter,
'',
$index,
$splitterResult->getBases()
);

foreach ($splitterResult->getLocales() as $locale) {
$lang = substr($locale, 0, 2);
Expand Down Expand Up @@ -218,6 +214,11 @@ private function indexResourcesPerLanguageIndex(
string $index,
array $pathList
): void {

if (empty($pathList)) {
return;
}

$offset = 0;
$successCount = 0;

Expand Down

0 comments on commit 7764bd6

Please sign in to comment.