src/LoginPolicy/LoginPolicy.php
public function &setUsernameFormat($value)
    {
        if (in_array($value, self::VALID_USERNAME_FORMATS)) {
            $this->username_format = $value;
        } else {
            throw new InvalidArgumentException('Username format is not valid');
        }

        return $this;
    }
public function &setUsernameFormat($value)
    {
        if (in_array($value, self::VALID_USERNAME_FORMATS)) {
            $this->username_format = $value;
        } else {
            throw new InvalidArgumentException('Username format is not valid');
        }

        return $this;
    }
{@inheritdoc}