Skip to content

Commit 3364bf1

Browse files
committed
phpstan updates
1 parent 9b81de9 commit 3364bf1

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/JWT.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,10 @@ class JWT
3535
* When checking nbf, iat or expiration times,
3636
* we want to provide some extra leeway time to
3737
* account for clock skew.
38+
*
39+
* @var int
3840
*/
39-
/* int */ public static $leeway = 0;
41+
/* array */ public static $leeway = 0;
4042

4143
/**
4244
* @var array<string, string[]>
@@ -227,7 +229,7 @@ public static function sign(
227229
return \hash_hmac($algorithm, $msg, $key, true);
228230
case 'openssl':
229231
$signature = '';
230-
$success = \openssl_sign($msg, $signature, $key, $algorithm);
232+
$success = \openssl_sign($msg, $signature, $key, $algorithm); // @phpstan-ignore-line
231233
if (!$success) {
232234
throw new DomainException("OpenSSL unable to sign data");
233235
}
@@ -284,7 +286,7 @@ private static function verify(
284286
list($function, $algorithm) = static::$supported_algs[$alg];
285287
switch ($function) {
286288
case 'openssl':
287-
$success = \openssl_verify($msg, $signature, $keyMaterial, $algorithm);
289+
$success = \openssl_verify($msg, $signature, $keyMaterial, $algorithm); // @phpstan-ignore-line
288290
if ($success === 1) {
289291
return true;
290292
} elseif ($success === 0) {

0 commit comments

Comments
 (0)