Skip to content

Commit 65920fd

Browse files
committed
fix array syntax for PHP 5.3
1 parent 28eb0e3 commit 65920fd

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/JWT.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -394,11 +394,11 @@ public static function urlsafeB64Encode($input)
394394
private static function getKeyMaterialAndAlgorithm($keyOrKeyArray, $kid = null)
395395
{
396396
if (is_string($keyOrKeyArray)) {
397-
return [$keyOrKeyArray, null];
397+
return array($keyOrKeyArray, null);
398398
}
399399

400400
if ($keyOrKeyArray instanceof Key) {
401-
return [$keyOrKeyArray->getKeyMaterial(), $keyOrKeyArray->getAlgorithm()];
401+
return array($keyOrKeyArray->getKeyMaterial(), $keyOrKeyArray->getAlgorithm());
402402
}
403403

404404
if (is_array($keyOrKeyArray) || $keyOrKeyArray instanceof ArrayAccess) {
@@ -412,10 +412,10 @@ private static function getKeyMaterialAndAlgorithm($keyOrKeyArray, $kid = null)
412412
$key = $keyOrKeyArray[$kid];
413413

414414
if ($key instanceof Key) {
415-
return [$key->getKeyMaterial(), $key->getAlgorithm()];
415+
return array($key->getKeyMaterial(), $key->getAlgorithm());
416416
}
417417

418-
return [$key, null];
418+
return array($key, null);
419419
}
420420

421421
throw new UnexpectedValueException(

0 commit comments

Comments
 (0)