public function setMaxAttempts($maxAttempts)
    {
        if (is_int($maxAttempts)) {
            $this->maxAttempts = $maxAttempts;
        } else {
            $msg = "MaxAttempts must be an integer, '" . gettype($maxAttempts) . "' given.";
            throw new InvalidArgumentException($msg);
        }
    }