Skip to content

Commit

Permalink
Fix Psalm nits
Browse files Browse the repository at this point in the history
  • Loading branch information
paragonie-security committed Aug 3, 2021
1 parent f18c4bd commit 611d691
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Keys/AsymmetricPublicKey.php
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,9 @@ public function encode(): string
*/
public static function fromEncodedString(string $encoded, ProtocolInterface $version = null): self
{
if (!$version) {
$version = new Version4();
}
if (hash_equals($version::header(), Version3::HEADER)) {
$decodeString = Base64UrlSafe::decode($encoded);
$length = Binary::safeStrlen($encoded);
Expand Down
2 changes: 2 additions & 0 deletions src/Util.php
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,8 @@ public static function validateAndRemoveFooter(
* @param string $byRef
* @return void
* @param-out string $byRef
*
* @psalm-suppress ReferenceConstraintViolation
*/
public static function wipe(string &$byRef): void
{
Expand Down

0 comments on commit 611d691

Please sign in to comment.