Skip to content

Commit

Permalink
refactor: Use safe null comparisons
Browse files Browse the repository at this point in the history
Signed-off-by: provokateurin <[email protected]>
  • Loading branch information
provokateurin committed Mar 13, 2024
1 parent 9899f41 commit 9e544d7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/JWTManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public function getToken(array $userdata): string {
}

public function getTokenPublicKey(?string $alg = null): string {
if (!$alg) {
if ($alg === null) {
$alg = $this->getTokenAlgorithm();
}
$this->ensureTokenKeys($alg);
Expand All @@ -74,7 +74,7 @@ public function getTokenPublicKey(?string $alg = null): string {
}

protected function getTokenPrivateKey(?string $alg = null): string {
if (!$alg) {
if ($alg === null) {
$alg = $this->getTokenAlgorithm();
}
$this->ensureTokenKeys($alg);
Expand Down

0 comments on commit 9e544d7

Please sign in to comment.