As @jmikola already suggested, sprintf is not needed here. I think this form is much cleaner:

```
        $abstractId = 'fos_elastica.model_to_elastica_transformer.prototype.auto';
        if ($this->serializerConfig) {
            $abstractId = 'fos_elastica.model_to_elastica_identifier_transformer';
        }
```