public function setNumberRepeats($numberRepeats)
    {
        if (is_int($numberRepeats) || (gettype($numberRepeats) === 'string' && Format::isVariableRef($numberRepeats))) {
            $this->numberRepeats = $numberRepeats;
        } else {
            $msg = "The numberRepeats argument must be an integer or a variable reference, '" . gettype($numberRepeats) . "' given.";
            throw new InvalidArgumentException($msg);
        }
    }
public function setNumberRepeats($numberRepeats)
    {
        if (is_int($numberRepeats) || (gettype($numberRepeats) === 'string' && Format::isVariableRef($numberRepeats))) {
            $this->numberRepeats = $numberRepeats;
        } else {
            $msg = "The numberRepeats argument must be an integer or a variable reference, '" . gettype($numberRepeats) . "' given.";
            throw new InvalidArgumentException($msg);
        }
    }
public function setNumberRepeats ( $ numberRepeats ) { if ( is_int ( $ numberRepeats ) || ( gettype ( $ numberRepeats ) === 'string' && Format :: isVariableRef ( $ numberRepeats ) ) ) { $ this -> numberRepeats = $ numberRepeats ; } else { $ msg = "The numberRepeats argument must be an integer or a variable reference, '" . gettype ( $ numberRepeats ) . "' given." ; throw new InvalidArgumentException ( $ msg ) ; } }
Set the numberRepeats attribute.

@param integer|string $numberRepeats An integer or a QTI variable reference.
@throws \InvalidArgumentException If $numberRepeats is not an integer nor a valid QTI variable reference.
Set the numberRepeats attribute .