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);
        }
    }
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);
        }
    }
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 ) ; } }
Set the maximum number of attempts in the given test context.

@param integer $maxAttempts An integer.
@throws \InvalidArgumentException If $maxAttempts is not an integer.
Set the maximum number of attempts in the given test context .