Skip to content

Commit f422f1f

Browse files
committed
style fixes
1 parent 9f8fbcc commit f422f1f

File tree

2 files changed

+18
-11
lines changed

2 files changed

+18
-11
lines changed

src/JWT.php

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@ class JWT
3636
* we want to provide some extra leeway time to
3737
* account for clock skew.
3838
*/
39-
public static /* int */ $leeway = 0;
39+
/* int */ public static $leeway = 0;
4040

41-
public static /* array */ $supported_algs = [
41+
/* array */ public static $supported_algs = [
4242
'ES384' => ['openssl', 'SHA384'],
4343
'ES256' => ['openssl', 'SHA256'],
4444
'HS256' => ['hash_hmac', 'SHA256'],
@@ -75,7 +75,8 @@ class JWT
7575
*/
7676
public static function decode(
7777
string $jwt,
78-
/* Key|array|ArrayAccess */ $keyOrKeyArray
78+
/* Key|array|ArrayAccess */
79+
$keyOrKeyArray
7980
): stdClass {
8081
// Validate JWT
8182
$timestamp = \time();
@@ -163,7 +164,8 @@ public static function decode(
163164
*/
164165
public static function encode(
165166
array $payload,
166-
/* string|resource|OpenSSLAsymmetricKey */ $key,
167+
/* string|resource|OpenSSLAsymmetricKey */
168+
$key,
167169
string $alg,
168170
string $keyId = null,
169171
array $head = null
@@ -200,7 +202,8 @@ public static function encode(
200202
*/
201203
public static function sign(
202204
string $msg,
203-
/* string|resource|OpenSSLAsymmetricKey */ $key,
205+
/* string|resource|OpenSSLAsymmetricKey */
206+
$key,
204207
string $alg
205208
): string {
206209
if (empty(static::$supported_algs[$alg])) {
@@ -255,7 +258,8 @@ public static function sign(
255258
private static function verify(
256259
string $msg,
257260
string $signature,
258-
/* string|resource|OpenSSLAsymmetricKey */ $keyMaterial,
261+
/* string|resource|OpenSSLAsymmetricKey */
262+
$keyMaterial,
259263
string $alg
260264
): bool {
261265
if (empty(static::$supported_algs[$alg])) {
@@ -381,7 +385,8 @@ public static function urlsafeB64Encode(string $input): string
381385
* @return Key
382386
*/
383387
private static function getKey(
384-
/* Key|array|ArrayAccess */ $keyOrKeyArray,
388+
/* Key|array|ArrayAccess */
389+
$keyOrKeyArray,
385390
?string $kid
386391
): Key {
387392
if ($keyOrKeyArray instanceof Key) {

src/Key.php

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,18 @@
88

99
class Key
1010
{
11-
private /* string|resource|OpenSSLAsymmetricKey */ $keyMaterial;
12-
private /* string */ $algorithm;
11+
/* string|resource|OpenSSLAsymmetricKey */ private $keyMaterial;
12+
/* string */ private $algorithm;
1313

1414
/**
1515
* @param string|resource|OpenSSLAsymmetricKey $keyMaterial
1616
* @param string $algorithm
1717
*/
1818
public function __construct(
19-
/* private string|resource|OpenSSLAsymmetricKey */ $keyMaterial,
20-
/* private */ string $algorithm
19+
/* private string|resource|OpenSSLAsymmetricKey */
20+
$keyMaterial,
21+
/* private */
22+
string $algorithm
2123
) {
2224
if (
2325
!is_string($keyMaterial)

0 commit comments

Comments
 (0)