public function setMax($max)
    {
        if (is_numeric($max) || Format::isVariableRef($max)) {
            $this->max = $max;
        } else {
            $msg = "'Max must be a numeric value or a variableRef, '" . gettype($max) . "' given.";
            throw new InvalidArgumentException($msg);
        }
    }
public function setMax($max)
    {
        if (is_numeric($max) || Format::isVariableRef($max)) {
            $this->max = $max;
        } else {
            $msg = "'Max must be a numeric value or a variableRef, '" . gettype($max) . "' given.";
            throw new InvalidArgumentException($msg);
        }
    }
public function setMax ( $ max ) { if ( is_numeric ( $ max ) || Format :: isVariableRef ( $ max ) ) { $ this -> max = $ max ; } else { $ msg = "'Max must be a numeric value or a variableRef, '" . gettype ( $ max ) . "' given." ; throw new InvalidArgumentException ( $ msg ) ; } }
Set the max attribute.

@param number|string $max A numeric value or a variableRef.
@throws \InvalidArgumentException If $max is not a numeric value nor a variableRef.
Set the max attribute .