summaryrefslogtreecommitdiff
path: root/matrix-specification/Responses/ClientRefreshPostResponse.php
diff options
context:
space:
mode:
Diffstat (limited to 'matrix-specification/Responses/ClientRefreshPostResponse.php')
-rw-r--r--matrix-specification/Responses/ClientRefreshPostResponse.php8
1 files changed, 5 insertions, 3 deletions
diff --git a/matrix-specification/Responses/ClientRefreshPostResponse.php b/matrix-specification/Responses/ClientRefreshPostResponse.php
index b1e1154..38519a3 100644
--- a/matrix-specification/Responses/ClientRefreshPostResponse.php
+++ b/matrix-specification/Responses/ClientRefreshPostResponse.php
@@ -2,7 +2,9 @@
namespace Matrix\Responses;
-class ClientRefreshPostResponse implements \JsonSerializable
+use Matrix\Response;
+
+class ClientRefreshPostResponse extends Response
{
public function __construct(
private string $accessToken,
@@ -11,12 +13,12 @@ class ClientRefreshPostResponse implements \JsonSerializable
)
{}
- public function jsonSerialize(): array
+ public function getBody(): array
{
return array_filter([
"access_token" => $this->accessToken,
"expires_in_ms" => $this->expiresInMilliseconds,
"refresh_token" => $this->refreshToken,
- ], "is_null");
+ ], fn ($value) => ! is_null($value));
}
}