diff --git a/src/Response/JsonResponse.php b/src/Response/JsonResponse.php index b210415..bb7378a 100644 --- a/src/Response/JsonResponse.php +++ b/src/Response/JsonResponse.php @@ -25,11 +25,19 @@ protected function setBody($body) return $this; } $body = json_decode($body, true); - if (is_null($body)) { + if ($body === null) { throw new HttpResponseException('Response data is no valid JSON string.'); } parent::setBody($body); return $this; } + /** + * @return array + */ + public function getBody() + { + return parent::getBody(); + } + }