public function setMaxChoices($maxChoices)
    {
        if (is_int($maxChoices) && $maxChoices !== 0) {

            if ($this->getMinChoices() > 0 && $maxChoices < $this->getMinChoices()) {
                $msg = "The 'maxChoices' argument must be greater than or equal to the 'minChoices' attribute.";
                throw new InvalidArgumentException($msg);
            }

            $this->maxChoices = $maxChoices;
        } else {
            $msg = "The 'maxChoices' argument must be a strictly negative or positive integer, '" . gettype($maxChoices) . "' given.";
            throw new InvalidArgumentException($msg);
        }
    }
public function setMaxChoices($maxChoices)
    {
        if (is_int($maxChoices) && $maxChoices !== 0) {

            if ($this->getMinChoices() > 0 && $maxChoices < $this->getMinChoices()) {
                $msg = "The 'maxChoices' argument must be greater than or equal to the 'minChoices' attribute.";
                throw new InvalidArgumentException($msg);
            }

            $this->maxChoices = $maxChoices;
        } else {
            $msg = "The 'maxChoices' argument must be a strictly negative or positive integer, '" . gettype($maxChoices) . "' given.";
            throw new InvalidArgumentException($msg);
        }
    }
public function setMaxChoices ( $ maxChoices ) { if ( is_int ( $ maxChoices ) && $ maxChoices !== 0 ) { if ( $ this -> getMinChoices ( ) > 0 && $ maxChoices < $ this -> getMinChoices ( ) ) { $ msg = "The 'maxChoices' argument must be greater than or equal to the 'minChoices' attribute." ; throw new InvalidArgumentException ( $ msg ) ; } $ this -> maxChoices = $ maxChoices ; } else { $ msg = "The 'maxChoices' argument must be a strictly negative or positive integer, '" . gettype ( $ maxChoices ) . "' given." ; throw new InvalidArgumentException ( $ msg ) ; } }
Set the maximum number of choices that the candidate must select and order to form a valid response. A negative
value indicates that no maxChoice is indicated.

@param integer $maxChoices A strictly negative or positive integer.
@throws \InvalidArgumentException If $maxChoices is not a strictly negative or positive integer.
Set the maximum number of choices that the candidate must select and order to form a valid response . A negative value indicates that no maxChoice is indicated .