src/Transformers/TransformerFactory.php
public function make($data)
    {
        if (is_object($data) && $data instanceof Request) {
            return new RequestTransformer();
        }

        if (is_array($data)) {
            return new ArrayTransformer();
        }

        throw new InvalidArgumentException('An array, or an instance of Illuminate\Http\Request was expected.');
    }
public function make($data)
    {
        if (is_object($data) && $data instanceof Request) {
            return new RequestTransformer();
        }

        if (is_array($data)) {
            return new ArrayTransformer();
        }

        throw new InvalidArgumentException('An array, or an instance of Illuminate\Http\Request was expected.');
    }
public function make ( $ data ) { if ( is_object ( $ data ) && $ data instanceof Request ) { return new RequestTransformer ( ) ; } if ( is_array ( $ data ) ) { return new ArrayTransformer ( ) ; } throw new InvalidArgumentException ( 'An array, or an instance of Illuminate\Http\Request was expected.' ) ; }
Make a new transformer instance.

@param mixed $data

@throws \InvalidArgumentException

@return \GrahamCampbell\Throttle\Transformers\TransformerInterface
Make a new transformer instance .