protected function processSingleResourceDocument($source): SingleResourceDocument
    {
        $resource = $this->hydrateResource($source->data);
        $document = new SingleResourceDocument($resource);

        $this->hydrateObject($document, $source);

        return $document;
    }
protected function processSingleResourceDocument($source): SingleResourceDocument
    {
        $resource = $this->hydrateResource($source->data);
        $document = new SingleResourceDocument($resource);

        $this->hydrateObject($document, $source);

        return $document;
    }
protected function processSingleResourceDocument ( $ source ) : SingleResourceDocument { $ resource = $ this -> hydrateResource ( $ source -> data ) ; $ document = new SingleResourceDocument ( $ resource ) ; $ this -> hydrateObject ( $ document , $ source ) ; return $ document ; }
Process document with single resource

@param  mixed $source
@return SingleResourceDocument
Process document with single resource