@param string|Type $type

@return $this
161009
public function setType($type): self
    {
        if ($type instanceof Type) {
            $this->setIndex($type->getIndex()->getName());
            $type = $type->getName();
        }
        $this->_metadata['_type'] = $type;

        return $this;
    }
50903
public function setRedirectType($type) {
        if (!is_int($type)) throw new IllegalTypeException('Illegal type of parameter $type: '.gettype($type));

        $this->redirectType = $type;
        return $this;
    }
1160783
public function type( $types )
	{
		if( !empty( $types ) ) {
			$this->conditions[] = $this->filter->compare( '==', 'stock.type', $types );
		}

		return $this;
	}
1025383
public function setType($type): self
    {
        if ($type instanceof Type) {
            $this->setIndex($type->getIndex()->getName());
            $type = $type->getName();
        }

        $this->_type = (string) $type;

        return $this;
    }
1046991
public function register(Type $type): self
    {
        $this->types[$type->name] = $type;

        return $this;
    }
849556
public function registerAsSingleton(string $type): self
    {
        $this->typeDefinition->register($type, true);
        return $this;
    }
1147266
public function setType($type)
    {
        if (in_array($type, array_keys($this->devices))) {
            $this->type = $type;
        }
    }
990660
public function allow($type)
    {
        if (!is_array($type)) {
            $type = func_get_args();
        }
        $this->allowedTypes = implode(',', $type);

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

        return $this->setParam('_type', $type);
    }
435439
public function type($type = null)
    {
        if (is_null($type)) {
            unset($this->filters['post_type']);
        } else {
            $this->filters['post_type'] = $type;
        }
        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;
    }
399321
public function setContentType($type)
    {
        $this->headerBag->appendPair('Content-Type', sprintf('%s;charset=%s', $type, $this->charset));
        return $this;
    }
950441
public function setType($type)
    {
        if (!in_array($type, self::TYPES)) {
            throw new \InvalidArgumentException("bad type {$type}");
        }
        $this->type = $type;

        return $this;
    }
398096
public function restrictTo(string $type)
    {
        if (count($this) > 0) {
            throw new CollectionException('Type restriction could not be applied to a non empty collection');
        }

        $this->type = $type;

        return $this;
    }
747894
public function type($type)
    {
        $type = strtoupper($type);
        if (!in_array($type, ['CURL', 'SOCKET', 'FILE'])) {
            $type = 'CURL';
        }
        $this->def['type'] = $type;
        return $this;
    }
224229
public function setType($type)
    {
        if (!in_array($type, array(
            self::TYPE_CORE,
            self::TYPE_DISTRIBUTION,
            self::TYPE_CAMPAIGN,
            self::TYPE_MILESTONE,
            self::TYPE_ACTIVITY,
            self::TYPE_OPERATION,
            self::TYPE_CHANNEL,
            self::TYPE_LOCATION,
            self::TYPE_SECURITY,
            self::TYPE_REPORT,
            self::TYPE_REPORT_ANALYTICS,
            self::TYPE_REPORT_BUDGET,
            self::TYPE_REPORT_SALES,
            self::TYPE_HOOK,
            self::TYPE_SYMFONY,
        ))) {
            throw new \InvalidArgumentException("Invalid bundle type.");
        }
        $this->type = $type;

        return $this;
    }
1103380
public function when(string $type, array $config = []): self
    {
        if (! isset($this->data['on'][$type])) {
            $this->data['on'][$type] = [];
        }

        $this->data['on'][$type] = \array_merge($this->data['on'][$type], $config);

        return $this;
    }