Total Complexity | 2 |
Total Lines | 15 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
9 | final class ElasticsearchContextFactory implements ElasticsearchContextFactoryInterface |
||
10 | { |
||
11 | public function create(string $className): ElasticsearchContext |
||
12 | { |
||
13 | $activityLogIndex = $this->getIndexName($className).'_'.$this->getIndexName(ActivityLog::class); |
||
14 | $currentDataTrackerIndex = $this->getIndexName($className).'_'.$this->getIndexName(CurrentDataTracker::class); |
||
15 | |||
16 | return new ElasticsearchContext($className, $activityLogIndex, $currentDataTrackerIndex); |
||
17 | } |
||
18 | |||
19 | private function getIndexName(string $className): string |
||
24 | } |
||
25 | } |
||
26 |