I did all the changes you requested, besides this one. I renamed to services to avoid the conflicted mentioned in your first comment, so now I think a ternary statement will not be very nice.

On 17.07.2013, at 22:07, Jeremy Mikola <notifications@github.com> wrote:

> In DependencyInjection/FOSElasticaExtension.php:
> 
> > @@ -307,7 +308,11 @@ protected function loadModelToElasticaTransformer(array $typeConfig, ContainerBu
> >          if (isset($typeConfig['model_to_elastica_transformer']['service'])) {
> >              return $typeConfig['model_to_elastica_transformer']['service'];
> >          }
> > -        $abstractId = sprintf('fos_elastica.model_to_elastica_transformer.prototype.auto');
> > +        if ($this->serializerConfig) {
> > +            $abstractId = sprintf('fos_elastica.model_to_elastica_transformer.prototype.identifier');
> > +        } else {
> > +            $abstractId = sprintf('fos_elastica.model_to_elastica_transformer.prototype.auto');
> > +        }
> 
> sprintf() doesn't do anything here, but perhaps we can rewrite this with a ternary statement?
> 
> $abstractId = sprintf(
>     'fos_elastica.model_to_elastica_transformer.prototype.%s',
>     ($this->serializerConfig ? 'identifier' : 'auto')
> );
> 
> —
> Reply to this email directly or view it on GitHub.
>