@param string $type

@return $this
161647
public function removeMapping($type)
    {
        $this->mappings->forget($type);
        $mappings = $this->getMappingsForClass($type);

        foreach ( $mappings as $key ) {
            $this->mappings->forget($key);
        }

        return $this;
    }
1267118
public function setType($type) {
        $types = [static::TYPE_DEFINED_ONLY, static::TYPE_ARBITRARY];
        if (in_array($type, $types)) {
            $this->type = $type;
        }
        return $this;
    }
458051
public function withType(string $type): self
    {
        $this->type = IdentityProviderEnum::ensureValid($type);
        return $this;
    }
779471
public function setObjectType($type)
    {
        if (!is_null($type)) {
            $type = (string) $type;
        }

        $this->objectType = $type;
        return $this;
    }
1008349
public function skipUntil($type) {
    while (!$this->isToken($type) && $this->hasNext()) {
      $this->moveNext();
    }

    return $this;
  }
433227
private function setType(string $type): self
    {
        switch ($type) {
            case 'navigator.id.getAssertion': // fall through
            case 'navigator.id.finishEnrollment':
                break;
            default:
                throw new IDE(IDE::MALFORMED_DATA, 'typ');
        }
        $this->typ = $type;
        return $this;
    }
213089
public function addFileType($type): self
    {
        $type = '.' . trim($type, '. ');

        if (!isset($this->watchedTypes[$type])) {
            $this->watchedTypes[$type] = true;
        }

        return $this;
    }
203064
public function withType(string $type): self
    {
        $this->type = UserPermissionEnum::ensureValid($type);
        return $this;
    }
1073689
public function type($type = null)
    {
        if (is_null($type)) {
            return $this->type;
        }

        $this->type = $type;

        return $this;
    }
1081968
public function set($type, $messages)
    {
        foreach((array) $messages as $message) {
            parent::set($type, $message);
        }

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

        $this->type = $type;

        return $this;
    }
292399
public function setType(?string $type): Workflow
    {
        if ($type !== null) {
            Assert::oneOf($type, self::VALID_TYPES);
        }
        $this->type = $type;

        return $this;
    }
1194794
public function setType($type)
    {
        if (!isset($this->types[$type])) {
            throw new InvalidArgumentException('type must be one of:' . implode(', ', array_keys($this->types)));
        }

        $this->type = $type;

        return $this;
    }
435439
public function type($type = null)
    {
        if (is_null($type)) {
            unset($this->filters['post_type']);
        } else {
            $this->filters['post_type'] = $type;
        }
        return $this;
    }
1221
public function on($type, $callback)
    {
        if (!isset($this->callbacks[$type])) {
            $this->callbacks[$type] = [];
        }
        $this->callbacks[$type][] = $callback;
        return $this;
    }
1292549
public function setType( $type )
	{
		if ( $type == $this->getType() ) { return; }

		$this->_checkType( $type );

		$this->_values['type'] = (string) $type;
		$this->setModified();
	}
1364765
public function addType($type)
    {
        if ($type instanceof Type) {
            $type = $type->getName();
        }

        if (!\is_string($type)) {
            throw new InvalidException('Invalid type type');
        }

        $this->_types[] = $type;

        return $this;
    }