Sets type for the filter treated as single.

@param string $singleType AbstractRangeOrSingleFilter::SINGLE_TYPE_*

@return static
@throws InvalidArgumentException On invalid argument
558448
public function setSingleType($singleType)
    {
        $allowedTypes = [
            self::SINGLE_TYPE_EXACT,
            self::SINGLE_TYPE_GREATER,
            self::SINGLE_TYPE_GREATER_OR_EQUAL,
            self::SINGLE_TYPE_LESS,
            self::SINGLE_TYPE_LESS_OR_EQUAL,
        ];

        if (!is_string($singleType) || !in_array($singleType, $allowedTypes, true)) {
            throw new InvalidArgumentException(sprintf(
                'Invalid "single type" argument. Allowed types: [%s].', implode(', ', $allowedTypes)
            ));
        }

        $this->singleType = $singleType;

        return $this;
    }
47295
public function setFileType(/*# string */ $fileType)
    {
        if (!Reader::isSupported($fileType)) {
            throw new InvalidArgumentException(
                Message::get(Message::CONFIG_FILE_TYPE_UNKNOWN, $fileType),
                Message::CONFIG_FILE_TYPE_UNKNOWN
            );
        }

        $this->file_type = $fileType;
        return $this;
    }
901989
public function setType(string $type):self
    {
        if (!isset($this->types[$type])) {
            Checkers::notice('Unknown response type [' . $type . ']');
        } else {
            $this->type = $type;
        }
        return $this;
    }
551635
public function setNodeType($nodeType)
    {
        if (is_string($nodeType)) {
            $nodeType = $this->nodeTypeManager->getNodeType($nodeType);
        }

        if (!$nodeType instanceof NodeType) {
            throw new \InvalidArgumentException('nodeType needs to be of type string or NodeType', 1452100970);
        }

        $this->nodeType = $nodeType;
    }
473363
public function setType($type)
    {
        if ($type instanceof Type) {
            $this->setIndex($type->getIndex());
            $type = $type->getName();
        }

        return $this->setParam('_type', $type);
    }
998468
public function setType($type)
    {
        if (!in_array($type, $this->getAvailableTypes())) {
            throw new \InvalidArgumentException('Unknown dependency type "' . $type . '"');
        }
        $this->type = $type;
        return $this;
    }
274950
public function setType(?string $type): self
    {
        if (!$this->isValidType($type)) {
            throw new \InvalidArgumentException(\sprintf(
                "Invalid type '%s'. Must be either NULL, one of %s, or a fully qualified class name or interface",
                $type,
                \implode(', ', $this->getValidTypes())
            ));
        }

        $this->type = $type;

        return $this;
    }
983723
public function setType($type)
    {
        if (is_string($type) === true) {
            $this->type = $type;
        } else {
            $msg = "The 'type' argument must be a non-empty string representing a mime-type, '" . gettype($type) . "' given.";
            throw new InvalidArgumentException($msg);
        }
    }
186337
public function setType($type) {
        if (!$this->isValidType($type)) {
            throw new InvalidTypeException('Type must be one of Metric::TYPE_*');
        }
        $this->type = $type;

        return $this;
    }
959964
public function setTypeAttribute($type)
    {
        if (!$type instanceof ContentType) {
            $type = ContentType::getByName($type);
        }
        if (!$type) {
            throw new InvalidArgumentException('Unknown content type');
        }
        $this->type()->associate($type);
    }
218292
public function setType($type)
    {
        if ($type === null || $type === 'array') {
            $this->type = $type;

            return $this;
        }

        if ($this->isObjectNameValid($type) !== true) {
            throw new InvalidArgumentException('Parameter type is not valid.');
        }

        $this->type = $type;

        return $this;
    }
1310026
public function setFiltertype($v)
    {
        if ($v !== null) {
            $v = (string) $v;
        }

        if ($this->filtertype !== $v) {
            $this->filtertype = $v;
            $this->modifiedColumns[SmartyFilterTableMap::FILTERTYPE] = true;
        }


        return $this;
    }
1075408
public function setMimetype($type)
    {
        if ($type === null || $type === false) {
            $this->mimetype = null;

            return $this;
        }

        if (!is_string($type)) {
            throw new InvalidArgumentException(
                'Mimetype must be a string'
            );
        }

        $this->mimetype = $type;

        return $this;
    }
12471
protected function setFileType(/*# string */ $fileType)
    {
        // validate file type
        $class = __NAMESPACE__ . '\\' . ucfirst($fileType) . 'Loader';
        if (!class_exists($class, true)) {
            throw new InvalidArgumentException(
                Message::get(Message::CONFIG_SUFFIX_UNKNOWN, $fileType),
                Message::CONFIG_SUFFIX_UNKNOWN
            );
        }
        $this->file_type = $fileType;
        $this->loader_class = $class;

        return $this;
    }
1097424
protected function setType(string $type) : void
    {
        if (empty($type)) {
            throw new InvalidArgumentException(__CLASS__ . ': Empty field type is not allowed');
        }

        if (! in_array($type, array_keys($this->defaultOptions))) {
            throw new InvalidArgumentException(__CLASS__ . ': Unsupported field type: ' . $type);
        }

        $this->type = $type;
    }
96259
public function setType($type)
    {
        if (!self::isValidType($type)) {
            throw new \InvalidArgumentException("$type is not a valid event type");
        }

        $this->type = $type;

        return $this;
    }
817910
public function setType($type)
    {
        if (!array_key_exists($type, $this->allowConditionRunType)) {
            $errMsg = sprintf('Not allowed type %s', $type);
            throw new Exception\InvalidMetadataException($errMsg);
        }
        $this->type = $type;

        return $this;
    }