Skip to content

Commit

Permalink
Fix static analysis
Browse files Browse the repository at this point in the history
  • Loading branch information
kocsismate committed Jun 23, 2020
1 parent fc76623 commit 0bb956b
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/JsonApi/Request/JsonApiRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 0bb956b

Please sign in to comment.