Skip to content

Commit

Permalink
Fix typehint for getPublicKey()
Browse files Browse the repository at this point in the history
  • Loading branch information
kelvinmo committed Jan 15, 2024
1 parent dc92c99 commit 4a27675
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/SimpleJWT/Keys/ECKey.php
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ public function isOnSameCurve(ECDHKeyInterface $public_key): bool {
return ($this->isValid() && $public_key->isValid());
}

public function getPublicKey(): ECKey {
public function getPublicKey(): ?KeyInterface {
$data = [
'kty' => $this->data['kty'],
'crv' => $this->data['crv'],
Expand Down
2 changes: 1 addition & 1 deletion src/SimpleJWT/Keys/OKPKey.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ public function isOnSameCurve($public_key): bool {
return true;
}

public function getPublicKey(): OKPKey {
public function getPublicKey(): ?KeyInterface {
$data = [
'kty' => $this->data['kty'],
'crv' => $this->data['crv'],
Expand Down
2 changes: 1 addition & 1 deletion src/SimpleJWT/Keys/RSAKey.php
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ public function isPublic(): bool {
return !isset($this->data['p']);
}

public function getPublicKey(): RSAKey {
public function getPublicKey(): ?KeyInterface {
$data = [
'kty' => $this->data['kty'],
'n' => $this->data['n'],
Expand Down

0 comments on commit 4a27675

Please sign in to comment.