private function validateEnumEntity(string $entity_class): void
    {
        if (false === \in_array(EnumeratorCompatibleEntityInterface::class, class_implements($entity_class))) {
            throw new \LogicException(sprintf(
                'The entity "%s" must implement "%s" in order to use it with enumerator accessor classes.',
                $entity_class,
                EnumeratorCompatibleEntityInterface::class
            ));
        }
    }