From 3d51718b42cca5da1fa5bd11774efabc9eb06554 Mon Sep 17 00:00:00 2001 From: Jitendra Adhikari Date: Sat, 20 Feb 2021 16:54:24 +0700 Subject: [PATCH] fix: escape namespace for PHP8 checks, break long lines --- src/ValidatesJWT.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/ValidatesJWT.php b/src/ValidatesJWT.php index 37e863e..adfae8e 100644 --- a/src/ValidatesJWT.php +++ b/src/ValidatesJWT.php @@ -118,7 +118,11 @@ protected function validateKey() throw new JWTException('Invalid key: Should be resource of private key', static::ERROR_KEY_INVALID); } - if (\PHP_VERSION_ID > 80000 && !($this->key instanceof OpenSSLAsymmetricKey || $this->key instanceof OpenSSLCertificate || $this->key instanceof OpenSSLCertificateSigningRequest)) { + if (\PHP_VERSION_ID > 80000 && !( + $this->key instanceof \OpenSSLAsymmetricKey + || $this->key instanceof \OpenSSLCertificate + || $this->key instanceof \OpenSSLCertificateSigningRequest + )) { throw new JWTException('Invalid key: Should be resource of private key', static::ERROR_KEY_INVALID); } }