getBody(); if ($requestBody["inhibit_login"] === false) { # TODO: validate } } public function getBody(): array { return array_filter([ "access_token" => $this->accessToken, "device_id" => $this->deviceId, "expires_in_ms" => $this->expiresInMilliseconds, "home_server" => $this->homeServer, "refresh_token" => $this->refreshToken, "user_id" => $this->userId, ], fn ($value) => ! is_null($value)); } }