Check if an array keys are in a given variable type.

@param string $type

@return bool
328958
private function checkType($type)
    {
        $isInType = true;

        foreach ($this->getKeys() as $key) {
            if (gettype($key) !== $type) {
                $isInType = false;
                break;
            }
        }

        return $isInType;
    }
172216
public function isValid($type = 'both')
	{
		$type  = strtolower($type);
		$flags = 0;

		if ($type === 'ipv4')
		{
			$flags = FILTER_FLAG_IPV4;
		}
		if ($type === 'ipv6')
		{
			$flags = FILTER_FLAG_IPV6;
		}

		return (bool) filter_var($this->ip, FILTER_VALIDATE_IP, ['flags' => $flags]);
	}
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;
    }
628621
private function hasRelation($type)
    {
        return in_array(
            $type,
            [
                ClassMetadataInfo::MANY_TO_MANY,
                ClassMetadataInfo::MANY_TO_ONE,
                ClassMetadataInfo::ONE_TO_ONE,
            ],
            true
        );
    }
1170031
private static function isInternalPhpType(string $type): bool
    {
        return in_array(strtolower($type), self::$internalPhpTypes, true);
    }
331464
static function getArrayType($type){
        self::isArray($type) or \PhpBoot\abort(new \InvalidArgumentException("$type is not array"));
        if($type == 'array') {
            return 'mixed';
        }else{
            return substr($type,0,-2);
        }
    }
410839
def is_array_type(type_):
    

    array_types = _get_types(Types.ARRAY)
    if is_typing_type(type_):
        return type_ in array_types or (
            hasattr(type_, "__origin__") and type_.__origin__ in array_types
        )
    return type_ in array_types
1017098
public function contains($type)
	{
		foreach($this->tokens as $token)
		{
			if($token->is($type))
			{
				return true;
			}
		}
		
		return false;
	}
902367
public function isValidType(?string $type): bool
    {
        return
            null === $type ||
            \class_exists($type) ||
            \interface_exists($type) ||
            \in_array($type, $this->getValidTypes());
    }
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;
    }
169297
public function has(string $type): bool
    {
        return isset($this->values[$type]) && \count($this->values[$type]) > 0;
    }
106893
public function has($type)
    {
        if (!isset($this->checkers[$type])) {
            return false;
        }

        return $this->container->has($this->checkers[$type]);
    }
909361
public function has($type = null)
    {
        if ($this->count() <= 0) {
            return false;
        }

        if (is_null($type)) {
            return true;
        }

        if (!$this->typeIsAvailable($type)) {
            return false;
        }

        foreach ($this->notifications as $key => $message) {
            if ($message->getType() == $type) {
                return true;
            }
        }

        return false;
    }
67163
public function containsOneOf(array $types)
	{
		foreach($this->tokens as $token)
		{
			if($token->isOneOf($types))
			{
				return true;
			}
		}
		
		return false;
	}
531648
public function hasDifferentDynamicType($types)
    {
        $number = 0;
        foreach ($types as $type) {
            if (isset($this->dynamicTypes[$type])) {
                ++$number;
            }
        }

        return 0 == $number;
    }
197087
public static function isList($val): bool
    {
        if (!\is_array($val) || !isset($val[0])) {
            return false;
        }

        /** @var array $val */
        $keys = \array_keys($val);

        return \array_keys($keys) === $keys;
    }
739640
public function is($type = null)
    {
        if ($type === null) {
            return $this->is;
        } else {
            return $type == $this->is;
        }
    }