Whitelists a type, if no type is whitelisted; all found types are whitelisted.
@param string $type , ...
170680
public function whitelistType($type)
    {
        foreach (func_get_args() as $arg) {
            if (!in_array($arg, $this->types)) {
                continue;
            }
            if (isset($this->alias[$arg])) {
                call_user_func_array([$this, "whitelistType"], $this->alias[$arg]);
            }
            $this->typeWhitelist[] = $arg;

        }

    }
1017098
public function contains($type)
	{
		foreach($this->tokens as $token)
		{
			if($token->is($type))
			{
				return true;
			}
		}
		
		return false;
	}
43005
public function isNodeTypeBlacklisted(string $type) : bool
    {
        return $this->nodeTypeBlacklist && isset($this->nodeTypeBlacklist[$type]);
    }
352597
public function setType($type)
    {
        $returnValue = (bool) false;

        
		$this->type = $type;
		$returnValue = true;
        

        return (bool) $returnValue;
    }
300532
public function addType(Type $type, $name = '')
    {
        if (!$name) {
            $name = (string)$type;
        }

        $this->types[$name] = $type;
    }
739055
public function addAllowedType($type)
    {
        if (!in_array(strtolower($type), $this->allowedTypes)) {
            $this->allowedTypes[] = strtolower($type);
        }
        return $this;
    }
828109
public static function checkSchemaType($type)
    {
        if (isset(self::$_schemaTypes[$type])) {
            return self::$_schemaTypes[$type];
        } else {
            return false;
        }
    }
579708
public function setShippingType($type)
    {
        $param = $type;
        if ($this->shipping == null) {
            $this->shipping = new PagSeguroShipping();
        }
        if ($param instanceof PagSeguroShippingType) {
            $this->shipping->setType($param);
        } else {
            $this->shipping->setType(new PagSeguroShippingType($param));
        }
    }
1147266
public function setType($type)
    {
        if (in_array($type, array_keys($this->devices))) {
            $this->type = $type;
        }
    }
1226938
public function hasFlagsOfType($type)
    {
        if ($this->flags === null) {
            return false;
        }

        foreach ($this->flags as $flag) {
            if ($flag->type == $type) {
                return true;
            }
        }

        return false;
    }
527254
public function setType($type)
	{
		if ($type === self::TYPE_CSS || $type === self::TYPE_JS)
			$this->_options['type'] = $type;
		else
			throw new Exception('Invalid type: '.$type);
	}
326707
public function type($type = null)
    {
        if (!func_num_args()) {
            return $this->_type;
        }
        $this->_type = $type;
        return $this;
    }
247290
public function mustBeTypeOf(string $type) : Slot
    {
        static $allowed_types = [
            'boolean',
            'bool',
            'integer',
            'int',
            'float',
            'double',
            'string',
            'array',
            'object',
            'resource',
            'NULL',
            'null',
        ];
        $this->type = in_array($type,$allowed_types) ? $type : self::TYPE_ANY;
        return $this;
    }
471760
public function addType(Type $type)
    {
        $name = $type->getName();

        if (!Type::hasType($name)) {
            Type::addType($name, get_class($type));
        }

        $this->types[$name] = $type;
    }
865371
public function onAddedToType(TypeInterface &$type)
    {
        parent::onAddedToType($type);

        if ($this->getAddIndex()) {
            $type->addIndex(new Index($this->name));
        }

        $type->addTrait(PositionInterface::class, PositionInterfaceImplementation::class);
    }
1140810
public function setType($type)
    {
        if (is_string($type) && in_array($type, self::$types)) {
            $this->type = $type;
        } else {
            throw new InvalidArgumentException;
        }
    }
1204155
public function addType($type)
    {
        if (func_num_args() > 1) {
            foreach (func_get_args() as $t) {
                $this->addType($t);
            }
        } else {
            if (is_array($type)) {
                foreach ($type as $t) {
                    $this->addType($t);
                }
            } else {
                if (!$this->typeIsAvailable($type)) {
                    $this->types[] = $type;
                }
            }
        }

        return $this;
    }