diff --git a/src/TransformerAbstract.php b/src/TransformerAbstract.php index 2122aff8..cd0e9902 100644 --- a/src/TransformerAbstract.php +++ b/src/TransformerAbstract.php @@ -14,7 +14,7 @@ use League\Fractal\Resource\Collection; use League\Fractal\Resource\Item; use League\Fractal\Resource\NullResource; -use League\Fractal\Resource\ResourceAbstract; +use League\Fractal\Resource\ResourceInterface; /** * Transformer Abstract @@ -188,13 +188,13 @@ protected function callIncludeMethod(Scope $scope, $includeName, $data) return false; } - if (! $resource instanceof ResourceAbstract) { + if (! $resource instanceof ResourceInterface) { throw new \Exception(sprintf( 'Invalid return value from %s::%s(). Expected %s, received %s.', __CLASS__, $methodName, - 'League\Fractal\Resource\ResourceAbstract', - gettype($resource) + 'League\Fractal\Resource\ResourceInterface', + is_object($resource) ? get_class($resource) : gettype($resource) )); }