Skip to content

Commit

Permalink
Leverage non-capturing catches
Browse files Browse the repository at this point in the history
  • Loading branch information
fancyweb committed Apr 1, 2022
1 parent 852e552 commit e7520cd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Hasher/MessageDigestPasswordHasher.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public function __construct(string $algorithm = 'sha512', bool $encodeHashAsBase

try {
$this->hashLength = \strlen($this->hash('', 'salt'));
} catch (\LogicException $e) {
} catch (\LogicException) {
// ignore algorithm not supported
}

Expand Down
2 changes: 1 addition & 1 deletion Hasher/Pbkdf2PasswordHasher.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public function __construct(string $algorithm = 'sha512', bool $encodeHashAsBase

try {
$this->encodedLength = \strlen($this->hash('', 'salt'));
} catch (\LogicException $e) {
} catch (\LogicException) {
// ignore unsupported algorithm
}

Expand Down

0 comments on commit e7520cd

Please sign in to comment.