Sets the the number of fragment ions matched

@param int $ionsMatched
The number of ions matched
@throws \InvalidArgumentException If the arguments do not match the data types
191500
public function setIonsMatched($ionsMatched)
    {
        if (! is_int($ionsMatched)) {
            throw new \InvalidArgumentException(
                'Argument 1 must be an int value. Valued passed is of type ' . gettype($ionsMatched));
        }
        
        $this->ionsMatched = $ionsMatched;
    }
980163
public function setDefaultResourceMatcher($defaultResourceMatcher)
    {
        if (is_scalar($defaultResourceMatcher)) {
            $defaultResourceMatcher = 'Gobline\\Acl\\Matcher\\'.ucfirst($defaultResourceMatcher).'Matcher';
            $defaultResourceMatcher = new $defaultResourceMatcher();
        } elseif (!$resource instanceof MatcherInterface) {
            throw new \InvalidArgumentException('$defaultResourceMatcher is expected to be of type string or Gobline\Acl\Matcher\MatcherInterface');
        }

        $this->defaultResourceMatcher = $defaultResourceMatcher;
    }
1252363
public function setNum($num = 20)
    {
        if (!is_numeric($num) && $num !== self::SEARCH_ALL) {
            throw new \InvalidArgumentException(
                'Argument can only be numeric or "all" to return all results.'
            );
        }
        $this->otherOptions['num'] = $num;

        return $this;
    }
772959
public function setNumTotal($total)
    {
        if (!is_numeric($total)) {
            throw new InvalidArgumentException(
                'Total Number must be numeric.'
            );
        }

        $total = (int)$total;
        if ($total < 0) {
            throw new InvalidArgumentException(
                'Total Number must be greater than zero.'
            );
        }

        $this->numTotal = $total;

        return $this;
    }
339160
public function setFragment($fragment = null)
    {
        if (is_string($fragment)) {
            if ($fragment{0} === '#') {
                $fragment = substr($fragment, 1);
            }
        }
        else if (!is_null($fragment)) {
            throw new \InvalidArgumentException(
                "invalid value provided for 'fragment'; ".
                "expecting a string or null"
            );
        }

        $this->fragment = $fragment;
        return $this;
    }
982211
public function setMin($min)
    {
        if (is_numeric($min) || Format::isVariableRef($min)) {
            $this->min = $min;
        } else {
            $msg = "'Min' must be a numeric value or a variableRef, '" . gettype($min) . "' given.";
            throw new InvalidArgumentException($msg);
        }
    }
270507
public function setUnion(EnumSet $other): void
    {
        if ($this->enumeration !== $other->enumeration) {
            throw new InvalidArgumentException(\sprintf(
                'Other should be of the same enumeration as this %s',
                $this->enumeration
            ));
        }

        $this->bitset = $this->bitset | $other->bitset;
    }
431377
protected function setExchangeRate(float $exchangeRate): void
    {
        if ( ! is_float($exchangeRate)) {
            throw new \InvalidArgumentException(sprintf('ExchangeRate has to be a float. %s given.', gettype($exchangeRate)));
        }

        $this->exchangeRate = $exchangeRate;
    }
639695
public function setRetryLimit($retryLimit = null)
    {
        if (! is_numeric($retryLimit) && ! is_null($retryLimit)) {
            throw new InvalidArgumentException('Retry limit must be a number or null.');
        }

        if (is_string($retryLimit)) {
            $retryLimit = (int) $retryLimit;
        }

        $this->retryLimit = $retryLimit;

        return $this;
    }
314532
public function setFixed($fixed)
    {
        if (is_bool($fixed)) {
            $this->fixed = $fixed;
        } else {
            $msg = "Fixed must be a boolean, '" . gettype($fixed) . "' given.";
            throw new InvalidArgumentException($msg);
        }
    }
185926
private function whenMatch(Enum $enum, Match $match)
    {
        if (!$enum instanceof $this->subject) {
            $classSubject  = get_class($this->subject);
            $classArgument = get_class($enum);

            throw new InvalidArgumentException(
                "This map is already mapping an instance of {$classSubject}, " .
                "yet this invocation is trying to map an instance of {$classArgument}."
            );
        }

        if (array_key_exists($enum->getName(), $this->matches)) {
            throw new InvalidArgumentException(
                "This map has already mapped instance {$enum} to a value."
            );
        }

        /** @noinspection PhpInternalEntityUsedInspection */
        $this->matches[$enum->getName()] = $match;

        return $this;
    }
134832
protected function setVatNumber(string $vatNumber): void
    {
        if ( ! is_string($vatNumber)) {
            throw new \InvalidArgumentException(
                sprintf('The VAT Number MUST be a string. "%s" passed.', gettype($vatNumber))
            );
        }
        $this->vatNumber = $vatNumber;
    }
483020
public function setThreshold($threshold)
    {
        if (is_numeric($threshold)) {
            $this->threshold = $threshold;
            $this->svm->setOptions(
                array(
                    \SVM::OPT_PROBABILITY => true
                )
            );
            if ($this->model->isPrepared()) {
                $this->model->setPrepared(false);
            }
        } else {
            throw new \InvalidArgumentException("Threshold must be a float value between 0-1");
        }
    }
363417
public function setIndentationCount($indentationCount)
    {
        if (!is_int($indentationCount)) {
            throw new \InvalidArgumentException('The attribute indentationCount on the class Template has to be integer (' . gettype($indentationCount) . ('object' === gettype($indentationCount) ? ' ' . get_class($indentationCount) : '') . ' given).');
        }

        $this->indentationCount = $indentationCount;

        return $this;
    }
755790
protected function setQueryCount(string $query)
    {
        if ('' === $query) {
            throw new \InvalidArgumentException('setQueryCount require a valid string argument');
        }
        $this->queryCount = $query;
        $this->countMethod = self::COUNT_METHOD_QUERY;
    }
182834
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);
        }
    }
430525
private function setMatchedQuery( $matches = [ ], $query = '' ) {
        if ( ! is_null( $this->matched_rule ) ) {
            $mathed = \WP_MatchesMapRegex::apply( preg_replace( "!^.+\?!", '', $query ), $matches );
            $this->matched_query = addslashes( $mathed );
            parse_str( $this->matched_query, $this->perma_q_vars );
            if ( '404' === $this->error ) $this->error = NULL;
        }
    }