@@ -63,7 +63,9 @@ discard block |
||
63 | 63 | { |
64 | 64 | parent::__construct($headers); |
65 | 65 | |
66 | - if(count($headers) === 0 ) return; |
|
66 | + if(count($headers) === 0 ) { |
|
67 | + return; |
|
68 | + } |
|
67 | 69 | |
68 | 70 | // certificates |
69 | 71 | if(in_array(PublicJSONWebKeyParameters::X_509CertificateChain, $headers) && is_array($headers[PublicJSONWebKeyParameters::X_509CertificateChain])){ |
@@ -109,8 +111,9 @@ discard block |
||
109 | 111 | */ |
110 | 112 | public function setVisibility($visibility) |
111 | 113 | { |
112 | - if(!in_array($visibility, JSONWebKeyVisibility::$valid_values)) |
|
113 | - throw new InvalidJWKVisibilityException; |
|
114 | + if(!in_array($visibility, JSONWebKeyVisibility::$valid_values)) { |
|
115 | + throw new InvalidJWKVisibilityException; |
|
116 | + } |
|
114 | 117 | $this->visibility = $visibility; |
115 | 118 | return $this; |
116 | 119 | } |
@@ -71,7 +71,9 @@ |
||
71 | 71 | |
72 | 72 | $res = $this->rsa_imp->loadKey($this->pem_format, RSA::PRIVATE_FORMAT_PKCS1); |
73 | 73 | |
74 | - if(!$res) throw new RSABadPEMFormat(sprintf('pem %s',$pem_format )); |
|
74 | + if(!$res) { |
|
75 | + throw new RSABadPEMFormat(sprintf('pem %s',$pem_format )); |
|
76 | + } |
|
75 | 77 | |
76 | 78 | $this->n = $this->rsa_imp->modulus; |
77 | 79 | } |
@@ -37,8 +37,9 @@ |
||
37 | 37 | |
38 | 38 | parent::__construct($pem_format, $password); |
39 | 39 | $this->d = $this->rsa_imp->exponent; |
40 | - if($this->d->toString() === $this->e->toString()) |
|
41 | - throw new RSABadPEMFormat(sprintf('pem %s is a public key!', $pem_format)); |
|
40 | + if($this->d->toString() === $this->e->toString()) { |
|
41 | + throw new RSABadPEMFormat(sprintf('pem %s is a public key!', $pem_format)); |
|
42 | + } |
|
42 | 43 | } |
43 | 44 | |
44 | 45 | /** |