| Total Complexity | 3 | 
| Total Lines | 35 | 
| Duplicated Lines | 0 % | 
| Coverage | 0% | 
| Changes | 0 | ||
| 1 | <?php | ||
| 7 | class ElasticsearchRepository extends AbstractElasticsearchRepository | ||
| 8 | { | ||
| 9 | /** | ||
| 10 | * Elastic search index name | ||
| 11 | * | ||
| 12 | * @return string | ||
| 13 | */ | ||
| 14 | public function getIndexName(): string | ||
| 15 |     { | ||
| 16 | return $this->getIndexNameFromEntityName(); | ||
| 17 | } | ||
| 18 | |||
| 19 | /** | ||
| 20 | * Converts entity name to index name by removing namespace and converting to snake case. | ||
| 21 | * | ||
| 22 | * @return string | ||
| 23 | */ | ||
| 24 | protected function getIndexNameFromEntityName(): string | ||
| 29 | } | ||
| 30 | |||
| 31 | /** | ||
| 32 | * Converts string from camelCase to snake_case | ||
| 33 | * | ||
| 34 | * @param string $name | ||
| 35 | * | ||
| 36 | * @return string | ||
| 37 | */ | ||
| 38 | protected function camelCaseToSnakeCase(string $name): string | ||
| 42 | ); | ||
| 43 | } | ||
| 45 |