From ba89e2cca5478d48b183f1f9a33914b1fffea010 Mon Sep 17 00:00:00 2001 From: Tom Kay Date: Thu, 30 Jan 2020 10:38:32 +0000 Subject: [PATCH] format --- src/Fident.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Fident.php b/src/Fident.php index 79cb8ce..9298d77 100644 --- a/src/Fident.php +++ b/src/Fident.php @@ -28,7 +28,7 @@ public function getConfig(): FidentConfiguration public function verifyJwt(string $rawJwt): bool { - list($head64, $payload64, $sig64) = explode('.', $rawJwt, 3); + [$head64, $payload64, $sig64] = explode('.', $rawJwt, 3); $header = json_decode(Strings::urlsafeBase64Decode($head64)); if(!$header || !isset($header->typ) || $header->typ !== 'JWT') { @@ -42,7 +42,7 @@ public function decodeJwtPayload(string $rawJwt): ?FidentJwtData { $data = new FidentJwtData(); - list(, $payload64,) = explode('.', $rawJwt, 3); + [, $payload64,] = explode('.', $rawJwt, 3); $payload = json_decode(Strings::urlsafeBase64Decode($payload64)); $payload->payload = Strings::urlsafeBase64Decode($payload->payload);