src/Transformers/TransformerResolver.php
public function resolve($transformer)
    {
        if (is_string($transformer)) {
            return $this->container->make($transformer);
        }

        if (! is_callable($transformer) && ! $transformer instanceof Transformer) {
            throw new InvalidTransformerException;
        }

        return $transformer;
    }
public function resolve($transformer)
    {
        if (is_string($transformer)) {
            return $this->container->make($transformer);
        }

        if (! is_callable($transformer) && ! $transformer instanceof Transformer) {
            throw new InvalidTransformerException;
        }

        return $transformer;
    }
Resolve a transformer.

@param  \Flugg\Responder\Transformers\Transformer|string|callable $transformer
@return \Flugg\Responder\Transformers\Transformer|callable
@throws \Flugg\Responder\Exceptions\InvalidTransformerException