From 0bb956bd6e5bcaf7b79b7f02bd0f77f581a9cab7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1t=C3=A9=20Kocsis?= Date: Tue, 23 Jun 2020 11:20:53 +0200 Subject: [PATCH] Fix static analysis --- src/JsonApi/Request/JsonApiRequest.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/JsonApi/Request/JsonApiRequest.php b/src/JsonApi/Request/JsonApiRequest.php index 41e72f9b..e172a547 100644 --- a/src/JsonApi/Request/JsonApiRequest.php +++ b/src/JsonApi/Request/JsonApiRequest.php @@ -478,11 +478,7 @@ protected function setFiltering(): array */ public function getResource($default = null) { - $body = $this->getParsedBody(); - - if (is_object($body)) { - return $body->data ?? $default; - } + $body = (array) $this->getParsedBody(); return $body["data"] ?? $default; }