@param IType $type

@return bool
166438
protected function checkThisIsSubsetOf(IType $type) : bool
    {
        if ($type instanceof MixedType) {
            return true;
        } elseif ($type instanceof UnionType) {
            if ( $type->hasUnionedType($this)) {
                return true;
            }

            foreach ($type->getTypes() as $type) {
                if ($this->isSubsetOf($type)) {
                    return true;
                }
            }

            return false;
        } elseif ($type instanceof NotType) {
            return !$type->getType()->isSubsetOf($this);
        } else {
            return false;
        }
    }
1018751
private function allowedTypeExist(string $type):bool
    {
        foreach ($this->allowed_text_render as $one) {
            if ($one["type"] === $type) {
                return (true);
            }
        }
        return (false);
    }
108272
protected function checkType($type)
    {
        // If no types to check are defined return true
        if (empty($this->types)) {
            return true;
        }

        // Check input type
        $expression = implode('|', $this->types);
        $valid = preg_match('/^(' . $expression . ')$/', $type);

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

        return $this->setParam('_type', $type);
    }
207563
public function hasType(NodeType $type)
    {
        foreach ($this->types as $t) {
            if ($t->getId() == $type->getId()) { return true; }
        }

        return false;
    }
365958
private static function isNumberType(Type $type)
    {
        return $type instanceof IntegerType || $type instanceof SmallIntType || $type instanceof BigIntType || $type instanceof DecimalType || $type instanceof FloatType;
    }
1092359
public function isType($type): bool
    {
        if ($type instanceof ComplexType) {
            return $this->isComplexType($type);
        }

        return $this->isPrimitive($type);
    }
841994
public function isType($type)
    {
        if (!$this->isTypeSupported($type)) {
            throw new Exception('Unsupported query type');
        }

        return isset($this->parsedSql[$type]);
    }
560280
private function _isInheritanceType($type)
    {
        return $type == self::INHERITANCE_TYPE_NONE ||
                $type == self::INHERITANCE_TYPE_SINGLE_TABLE ||
                $type == self::INHERITANCE_TYPE_JOINED ||
                $type == self::INHERITANCE_TYPE_TABLE_PER_CLASS;
    }
46612
public function equals(Type $type) {
        if ($type === $this) {
            return true;
        }
        if ($type->type !== $this->type) {
            return false;
        }
        if ($type->type === Type::TYPE_OBJECT) {
            return strtolower($type->userType) === strtolower($this->userType);
        }
        // TODO: handle sub types
        if (isset(self::$hasSubtypes[$this->type]) && isset(self::$hasSubtypes[$type->type])) {
            if (count($this->subTypes) !== count($type->subTypes)) {
                return false;
            }
            // compare 
            $other = $type->subTypes;
            foreach ($this->subTypes as $st1) {
                foreach ($other as $key => $st2) {
                    if ($st1->equals($st2)) {
                        unset($other[$key]);
                        continue 2;
                    }
                    // We have a subtype that's not equal
                    return false;
                }
            }
            return empty($other);
        }
        return true;
    }
736295
public function acceptType($type) {
        if ( ! isset($this->claim->accept_types) ) return false;
        if ( ! is_array($this->claim->accept_types) ) return false;
        return in_array($type, $this->claim->accept_types);
    }
686345
protected static function is_numeric( $type ) {
		switch ( $type ) {
			case self::INT:
			case self::TINYINT:
			case self::MEDIUMINT:
			case self::BIGINT:
			case self::DOUBLE:
			case self::FLOAT:
			case self::REAL:
			case self::DECIMAL:
				return true;
				break;
			default:
				return false;
				break;
		}
	}
793716
protected function supportedType($type)
    {
        $supportedType = false;

        $baseType = substr($type, 0, strpos($type, '-'));

        if (array_key_exists($baseType, $this->supportedTypes)) {
            $supportedType = $baseType;
        }

        return $supportedType;
    }
195659
public function lookaheadTypeIs(int $type): bool
    {
        return isset($this->tokens[$this->position]) && $this->tokens[$this->position]->typeEquals($type);
    }
271216
private function isDataProvider(string $type): bool
    {
        return (!$this->isSimpleType($type) && !$this->isCollection($type));
    }
272194
protected static function isType(array $types, ResolvedBlockTypeInterface $rType = null)
    {
        if (null === $rType) {
            return false;
        } elseif (!\in_array(\get_class($rType->getInnerType()), $types)) {
            return static::isType($types, $rType->getParent());
        }

        return true;
    }
827652
public static function isAllowed($type){
        return (!empty($type) && (in_array($type, self::$allowedTypes))) || self::isAssessmentItem($type) || self::isAssessmentTest($type);
    }