Skip to content

Commit a0ebc3a

Browse files
committed
Improve PHPDocs
1 parent 884ff7d commit a0ebc3a

5 files changed

Lines changed: 10 additions & 7 deletions

File tree

src/Auth.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -656,7 +656,7 @@ private function getUserRecordFromResponseAfterUserUpdate(ResponseInterface $res
656656
}
657657

658658
/**
659-
* @param positive-int|null $leewayInSeconds
659+
* @param non-negative-int|null $leewayInSeconds
660660
*/
661661
private function userSessionHasBeenRevoked(UnencryptedToken $verifiedToken, UserRecord $user, ?int $leewayInSeconds = null): bool
662662
{

src/Contract/Auth.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -321,8 +321,8 @@ public function createSessionCookie(#[SensitiveParameter] Token|string $idToken,
321321
*
322322
* @param Token|non-empty-string $idToken the JWT to verify
323323
* @param bool $checkIfRevoked whether to check if the ID token is revoked
324-
* @param positive-int|null $leewayInSeconds number of seconds to allow a token to be expired, in case that there
325-
* is a clock skew between the signing and the verifying server
324+
* @param non-negative-int|null $leewayInSeconds number of seconds to allow a token to be expired, in case that there
325+
* is a clock skew between the signing and the verifying server
326326
*
327327
* @throws FailedToVerifyToken if the token could not be verified
328328
* @throws RevokedIdToken if the token has been revoked
@@ -342,7 +342,7 @@ public function verifyIdToken(#[SensitiveParameter] Token|string $idToken, bool
342342
* to fix your environment's time to be consistent with Google's servers.
343343
*
344344
* @param non-empty-string $sessionCookie
345-
* @param positive-int|null $leewayInSeconds
345+
* @param non-negative-int|null $leewayInSeconds
346346
*
347347
* @throws FailedToVerifySessionCookie
348348
* @throws RevokedSessionCookie

src/Contract/RemoteConfig.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
interface RemoteConfig
2626
{
2727
/**
28-
* @param Version|VersionNumber|positive-int|non-empty-string $versionNumber
28+
* @param Version|VersionNumber|positive-int|non-empty-string|null $versionNumber
2929
*
3030
* @throws RemoteConfigException if something went wrong
3131
*/

src/RemoteConfig.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ private function ensureTemplate(Template|array $value): Template
116116
}
117117

118118
/**
119-
* @param VersionNumber|positive-int|non-empty-string $value
119+
* @param Version|VersionNumber|positive-int|non-empty-string $value
120120
*/
121121
private function ensureVersionNumber(Version|VersionNumber|int|string $value): VersionNumber
122122
{

tests/Unit/Messaging/AndroidConfigTest.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,9 @@ public function testItCanBeCreatedFromAnArray(array $data): void
5858
$this->assertEqualsCanonicalizing($data, $config->jsonSerialize());
5959
}
6060

61+
/**
62+
* @param non-negative-int|non-empty-string|null $ttl
63+
*/
6164
#[DoesNotPerformAssertions]
6265
#[DataProvider('validTtlValues')]
6366
public function testItAcceptsValidTTLs(int|string|null $ttl): void
@@ -96,7 +99,7 @@ public static function validDataProvider(): Iterator
9699
}
97100

98101
/**
99-
* @return Iterator<(array<int, int> | array<int, null> | array<int, string>)>
102+
* @return Iterator<(array<non-negative-int> | array<null> | array<non-empty-string>)>
100103
*/
101104
public static function validTtlValues(): Iterator
102105
{

0 commit comments

Comments
 (0)