diff options
Diffstat (limited to 'matrix-specification/Responses/ClientLoginPostResponse.php')
| -rw-r--r-- | matrix-specification/Responses/ClientLoginPostResponse.php | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/matrix-specification/Responses/ClientLoginPostResponse.php b/matrix-specification/Responses/ClientLoginPostResponse.php index 4bb893d..4a0fa7d 100644 --- a/matrix-specification/Responses/ClientLoginPostResponse.php +++ b/matrix-specification/Responses/ClientLoginPostResponse.php @@ -3,8 +3,9 @@ namespace Matrix\Responses; use Matrix\Data\DiscoveryInformation; +use Matrix\Response; -class ClientLoginPostResponse implements \JsonSerializable +class ClientLoginPostResponse extends Response { public function __construct( private string $accessToken, @@ -16,7 +17,7 @@ class ClientLoginPostResponse implements \JsonSerializable ) {} - public function jsonSerialize(): array + public function getBody(): array { return array_filter([ "access_token" => $this->accessToken, @@ -25,6 +26,6 @@ class ClientLoginPostResponse implements \JsonSerializable "refresh_token" => $this->refreshToken, "user_id" => $this->userId, "well_known" => $this->wellKnown, - ], "is_null"); + ], fn ($value) => ! is_null($value)); } } |
