Skip to content

Commit

Permalink
fix: escape namespace for PHP8 checks, break long lines
Browse files Browse the repository at this point in the history
  • Loading branch information
adhocore committed Feb 20, 2021
1 parent 835104c commit 3d51718
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/ValidatesJWT.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
Expand Down

0 comments on commit 3d51718

Please sign in to comment.