public function respond(int $statusCode = null, array $headers = []) : JsonResponse
{
if (!is_null($statusCode)) {
$this->setStatus($statusCode);
}
$data = $this->includeStatusCode($this->toArray());
return $this->responseFactory->json($data, $this->statusCode, $headers);
}