Total Complexity | 4 |
Total Lines | 20 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
5 | class IndexNamePrefixer |
||
6 | { |
||
7 | public static function getPrefixedIndexName(string $indexName): string |
||
8 | { |
||
9 | $prefix = \getenv('ELASTICSEARCH_INDEX_PREFIX'); |
||
10 | |||
11 | if ($prefix) { |
||
12 | return \sprintf('%s_%s', $prefix, $indexName); |
||
13 | } |
||
14 | |||
15 | return $indexName; |
||
16 | } |
||
17 | |||
18 | public static function getPrefixedIndexParameters(array $parameters): array |
||
25 | } |
||
26 | } |
||
27 |