src/Validator/Specific/Password.php
private function validateDifferentPreviousAll(): bool
    {
        if ($this->options['require-different-than-previous-all'] === true) {
            $passwordHash = (string)$this->value;
            foreach ($this->options['stored-passwords'] as $storedPassword) {
                if (PasswordEnctyption::compare($passwordHash, $storedPassword)) {
                    $this->setError(self::VALIDATOR_ERROR_PASSWORD_MUST_BE_DIFFERENT_THAN_PREVIOUS_ALL);
                    return false;
                }
            }
        }
        return true;
    }
private function validateDifferentPreviousAll(): bool
    {
        if ($this->options['require-different-than-previous-all'] === true) {
            $passwordHash = (string)$this->value;
            foreach ($this->options['stored-passwords'] as $storedPassword) {
                if (PasswordEnctyption::compare($passwordHash, $storedPassword)) {
                    $this->setError(self::VALIDATOR_ERROR_PASSWORD_MUST_BE_DIFFERENT_THAN_PREVIOUS_ALL);
                    return false;
                }
            }
        }
        return true;
    }
private function validateDifferentPreviousAll ( ) : bool { if ( $ this -> options [ 'require-different-than-previous-all' ] === true ) { $ passwordHash = ( string ) $ this -> value ; foreach ( $ this -> options [ 'stored-passwords' ] as $ storedPassword ) { if ( PasswordEnctyption :: compare ( $ passwordHash , $ storedPassword ) ) { $ this -> setError ( self :: VALIDATOR_ERROR_PASSWORD_MUST_BE_DIFFERENT_THAN_PREVIOUS_ALL ) ; return false ; } } } return true ; }
Validates that password is different than all previous passwords

@return bool
Validates that password is different than all previous passwords