Returns true if the lookahead type equals the given type.

@param int $type

@return bool
195659
public function lookaheadTypeIs(int $type): bool
    {
        return isset($this->tokens[$this->position]) && $this->tokens[$this->position]->typeEquals($type);
    }
1344017
public Boolean checkType(String type) {
    if (mtasPositionType == null) {
      return false;
    } else {
      return mtasPositionType.equals(type);
    }
  }
227630
public function nextIf(int $type): bool
    {
        if (!$this->current->typeEquals($type)) {
            return false;
        }

        $this->next();
        return true;
    }
687101
public function hasExceptionOfType($type)
    {
        foreach ($this->_exceptions as $e) {
            if ($e instanceof $type) {
                return true;
            }
        }

        return false;
    }
1092359
public function isType($type): bool
    {
        if ($type instanceof ComplexType) {
            return $this->isComplexType($type);
        }

        return $this->isPrimitive($type);
    }
1351767
protected function isSimpleType($type)
    {
        return $type == 'string'
            || $type == 'boolean' || $type == 'bool'
            || $type == 'integer' || $type == 'int'
            || $type == 'double' || $type == 'float'
            || $type == 'array' || $type == 'object';
    }
199354
private function validateType(int $type): bool
    {
        return $type === Node\Stmt\Use_::TYPE_NORMAL || $type === Node\Stmt\Use_::TYPE_UNKNOWN;
    }
572716
public function matchesMediaType(string $mediaType): bool
    {
        foreach ($this->mediaTypePatterns as $mediaTypePattern) {
            if ($mediaTypePattern->matches($mediaType)) {
                return true;
            }
        }
        return false;
    }
1196061
public static function hasOuterArray(string $type) : bool
    {
        $type = self::normalise($type, true);

        return (substr($type, -2) === '[]');
    }
408260
public function lookaheadTypeIsAnyOf(array $types): bool
    {
        return isset($this->tokens[$this->position]) && $this->tokens[$this->position]->typeEqualsAnyOf($types);
    }
873656
public function expectedIs($type)
    {
        // If people set type = message type, return true
        if (is_array($this->body) && isset($this->body['attachment']) && isset($this->body['attachment']['type'])) {
            return true;
        }

        if (is_string($this->body)) {
            $fileExtension = $this->detectMediaType($this->body);
            return $fileExtension === $type;
        }

        // If it's string, maybe it's URL. Check the extension
        if (isset($this->body['attachment']) && is_string($this->body['attachment']['payload']['url'])) {
            $fileExtension = $this->detectMediaType($this->body['attachment']['payload']['url']);
            return $fileExtension === $type;
        }

        return false;
    }
356330
public static function has($key, $type = 'ses')
    {
        return ($GLOBALS['TSFE']->fe_user->getKey(self::isType($type), $key)) ? true : false;
    }
902367
public function isValidType(?string $type): bool
    {
        return
            null === $type ||
            \class_exists($type) ||
            \interface_exists($type) ||
            \in_array($type, $this->getValidTypes());
    }
328958
private function checkType($type)
    {
        $isInType = true;

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

        return $isInType;
    }
588285
public function isSatisfiedBy(ReturnType\TypeInterface $type)
    {
        if (false == $type->isRealType()) {
            return false;
        }

        switch ($type->getDataType()) {
            case Types::T_INT:
            case Types::T_UINT:
            case Types::T_CHAR:
            case Types::T_UCHAR:
            case Types::T_LONG:
            case Types::T_ULONG:
                return true;
            default:
                return false;
        }
    }
158416
public function matches(array $jsonType)
    {
        if (array_key_exists(0, $this->jsonArray) && is_array($this->jsonArray[0])) {
            // a list of items
            $msg = '';
            foreach ($this->jsonArray as $array) {
                $res = $this->typeComparison($array, $jsonType);
                if ($res !== true) {
                    $msg .= "\n" . $res;
                }
            }
            if ($msg) {
                return $msg;
            }
            return true;
        }
        return $this->typeComparison($this->jsonArray, $jsonType);
    }
633971
public function isCombinedField(string $type) : bool
    {
        $result = false;

        if (strpos($type, 'money') !== false || strpos($type, 'metric') !== false) {
            $result = true;
        }

        return $result;
    }