src/Resources/ResourceFactory.php
protected function resolveTransformer($data, $transformer)
    {
        if (isset($transformer)) {
            return $this->transformerResolver->resolve($transformer);
        }

        return $this->transformerResolver->resolveFromData($data);
    }
protected function resolveTransformer($data, $transformer)
    {
        if (isset($transformer)) {
            return $this->transformerResolver->resolve($transformer);
        }

        return $this->transformerResolver->resolveFromData($data);
    }
Resolve a transformer.

@param  mixed                                                          $data
@param  \Flugg\Responder\Transformers\Transformer|string|callable|null $transformer
@return \Flugg\Responder\Transformers\Transformer|callable