Remove false check from type hinted argument

Type hint includes null and string, not false

Change-Id: I4644255b7cf2e9db940eb2cdedee0f20df0cc130
This commit is contained in:
Umherirrender 2020-06-21 22:35:15 +02:00
parent 733872afda
commit bff29fc8f4

View file

@ -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' );