Skip to content

Commit

Permalink
Correct the type information for registration attach (#8)
Browse files Browse the repository at this point in the history
The logic here is unchanged, but docblock type information for the input
array was not. It's the `id` field that's required, not `handle`.

Also removes an extraneous comment that's outdated.
  • Loading branch information
Firehed authored Apr 25, 2024
1 parent 91d5358 commit 6ee8f16
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions src/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,14 +70,6 @@ public function __construct(
$this->secretKey = $secretKey;
}

/**
* return array{
* user: array{
* id: string,
* handle: string,
* },
* }
*/
public function verifyAuthToken(string $authToken): AuthResponse
{
return $this->makeApiCall(
Expand All @@ -91,8 +83,8 @@ public function verifyAuthToken(string $authToken): AuthResponse

/**
* @param array{
* handle: string,
* id?: string,
* handle?: string,
* id: string,
* } $user
*/
public function attachRegistration(string $regToken, array $user): AttachResponse
Expand Down

0 comments on commit 6ee8f16

Please sign in to comment.