Skip to content

Commit

Permalink
make more readable
Browse files Browse the repository at this point in the history
  • Loading branch information
freekmurze authored Aug 21, 2023
1 parent cb0fa5c commit 4ae2b08
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/Commands/GenerateKeyCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,10 @@ public function handle()
protected function generateRandomKey(): string
{
$randomBytes = $this->generateRandomBytes();
if ($this->option('base64'))
return Base64UrlSafe::encode($randomBytes);
return Hex::encode($randomBytes);

return $this->option('base64')
? Base64UrlSafe::encode($randomBytes)
: Hex::encode($randomBytes);
}

/**
Expand Down

0 comments on commit 4ae2b08

Please sign in to comment.