private createReplyForEmptyData ( array | null $data ) : Neomerx\JsonApi\Contracts\Encoder\Parser\ParserReplyInterface | ||
$data | array | null | |
return | Neomerx\JsonApi\Contracts\Encoder\Parser\ParserReplyInterface |
private function createReplyForEmptyData($data)
{
$data === null || is_array($data) === true && empty($data) === true ?: Exceptions::throwLogicException();
$replyType = $data === null ? ParserReplyInterface::REPLY_TYPE_NULL_RESOURCE_STARTED : ParserReplyInterface::REPLY_TYPE_EMPTY_RESOURCE_STARTED;
return $this->parserFactory->createEmptyReply($replyType, $this->stack);
}