Remove false check from type hinted argument
Type hint includes null and string, not false Change-Id: I4644255b7cf2e9db940eb2cdedee0f20df0cc130
This commit is contained in:
parent
733872afda
commit
bff29fc8f4
1 changed files with 1 additions and 1 deletions
|
|
@ -139,7 +139,7 @@ final class PasswordFactory {
|
|||
* @throws PasswordError If hash is invalid or type is not recognized
|
||||
*/
|
||||
public function newFromCiphertext( ?string $hash ) : Password {
|
||||
if ( $hash === null || $hash === false || $hash === '' ) {
|
||||
if ( $hash === null || $hash === '' ) {
|
||||
return new InvalidPassword( $this, [ 'type' => '' ], null );
|
||||
} elseif ( $hash[0] !== ':' ) {
|
||||
throw new PasswordError( 'Invalid hash given' );
|
||||
|
|
|
|||
Loading…
Reference in a new issue