From bd25325b32974fe69723344a4d96a81e9740f094 Mon Sep 17 00:00:00 2001 From: Manuel Reinhard Date: Wed, 16 Oct 2024 09:32:54 +0200 Subject: [PATCH] Fix codestyle --- lib/ApiClient/Http/Response.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/ApiClient/Http/Response.php b/lib/ApiClient/Http/Response.php index fafe220..1a811c9 100644 --- a/lib/ApiClient/Http/Response.php +++ b/lib/ApiClient/Http/Response.php @@ -22,10 +22,10 @@ public function getStatusCode(): int public function getContent(): array { - if (!$this->content) { - return []; - } - + if (!$this->content) { + return []; + } + return json_decode($this->content, true, 512, JSON_THROW_ON_ERROR); } @@ -82,7 +82,7 @@ private function getLastElementOfLocationHeader(): ?string private function getLocationHeaderContent(): ?string { - foreach($this->getHeaders() as $key => $content) { + foreach ($this->getHeaders() as $key => $content) { if (strtolower($key) === 'location') { return trim($content[0]); }