| Total Complexity | 3 |
| Total Lines | 19 |
| Duplicated Lines | 0 % |
| Coverage | 0% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 9 | class ClassMap extends AbstractArrayDriver implements ArrayDriverInterface |
||
| 10 | { |
||
| 11 | use AutoKeyedMapTrait; |
||
| 12 | |||
| 13 | protected function getObjectAsKey(object $item): string |
||
| 14 | { |
||
| 15 | return $this->convertToSnakeCase($this->getClassName($item)); |
||
| 16 | } |
||
| 17 | |||
| 18 | protected function getClassName(object $class): string |
||
| 19 | { |
||
| 20 | $class = explode('\\', get_class($class)); |
||
| 21 | |||
| 22 | return end($class); |
||
| 23 | } |
||
| 24 | |||
| 25 | protected function convertToSnakeCase(string $class): string |
||
| 28 | } |
||
| 29 | } |
||
| 30 |