Skip to content

Commit

Permalink
Merge pull request #179 from maximehuran/feature/correct-mapping-append
Browse files Browse the repository at this point in the history
Append default analyzer if no locale
  • Loading branch information
maximehuran authored Aug 11, 2023
2 parents 71cd22f + ac76594 commit 88eba48
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Mapping/YamlWithLocaleProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,12 +91,12 @@ private function appendMapping(string $configurationDirectory, array $mapping, s

private function appendLocaleAnalyzers(string $configurationDirectory, array $mapping, ?string $locale): array
{
$mapping = $this->appendAnalyzers($configurationDirectory . \DIRECTORY_SEPARATOR . 'analyzers.yaml', $mapping);

if (null === $locale) {
return $mapping;
}

$mapping = $this->appendAnalyzers($configurationDirectory . \DIRECTORY_SEPARATOR . 'analyzers.yaml', $mapping);

foreach ($this->getLocaleCode($locale) as $localeCode) {
$mapping = $this->appendAnalyzers($configurationDirectory . \DIRECTORY_SEPARATOR . 'analyzers_' . $localeCode . '.yaml', $mapping);
}
Expand Down

0 comments on commit 88eba48

Please sign in to comment.