@param $tokenType

@return bool
433384
public static function tokenIsNumberAndHasExtraWhiteSpaceRight($tokenType)
    {
        return
            $tokenType !== Tokenizer::TOKEN_TYPE_QUOTE
            && $tokenType !== Tokenizer::TOKEN_TYPE_BACK_TICK_QUOTE
            && $tokenType !== Tokenizer::TOKEN_TYPE_WORD
            && $tokenType !== Tokenizer::TOKEN_TYPE_NUMBER;
    }
1261873
public function nextIfLookaheadAnyOf(array $types): bool
    {
        if (!isset($this->tokens[$this->position]) || !$this->tokens[$this->position]->typeEqualsAnyOf($types)) {
            return false;
        }

        $this->next();
        return true;
    }
1123269
public function hasFieldOfType($fieldType)
    {
        foreach ($this->fields as $field) {
            if ($field['type'] == $fieldType) {
                return true;
            }
        }

        return false;
    }
965703
public function isTokenValid($token) {
        $record = List_Unsubscribe_Token::where('token', $token)->first();

        if (!$record) {
            return false;
        }
        return true;
    }
809493
protected function expectTokenType($type)
    {
        $types = (array) $type;
        if (in_array($this->predictTokenType(), $types)) {
            return $this->lexer->getAdvancedToken();
        }

        $token = $this->lexer->predictToken();

        throw new ParserException(sprintf(
            'Expected %s token, but got %s on line: %d%s',
            implode(' or ', $types),
            $this->predictTokenType(),
            $token['line'],
            $this->file ? ' in file: ' . $this->file : ''
        ));
    }
197549
public function delete($token, $type)
    {
        $this->getTable()->where('token', $token)->where('type', $type)->delete();
    }
700865
private function checkType($type)
    {
        if (!empty($this->allowTypes)) {
            return in_array(strtolower($type), $this->allowTypes);
        }
        return true;
    }
846013
public function isSingleton($type): bool
    {
        assert(isset($this->types[$type]));
        return $this->types[$type];
    }
1122784
public function verify($token)
    {
        try {
            $this->client()->head('authentication-tokens/{token}', ['token' => $token]);

            return true;
        } catch (NotFoundException $e) {
            return false;
        }
    }
842906
public function hasAutowiringType($type)
    {
        @trigger_error(sprintf('Autowiring-types are deprecated since Symfony 3.3 and will be removed in 4.0. Use aliases instead for "%s".', $type), E_USER_DEPRECATED);

        return isset($this->autowiringTypes[$type]);
    }
208452
public function isValidToken($token)
    {
        if (! $token) {
            return false;
        }

        /**
         * @var $tokenModel Token
         */
        $tokenModel = $this->tokens()->where('token', $token)->first();

        return $tokenModel ? $tokenModel->isValid() : false;
    }
813861
private function is_text_col( $type ) {
		foreach ( array( 'text', 'varchar' ) as $token ) {
			if ( false !== strpos( $type, $token ) ) {
				return true;
			}
		}

		return false;
	}
533910
private function registerDeclaration(int $tokenID, int $tokenType)
    {
        $localID = $tokenID + 1;
        while ($this->tokens[$localID][self::TOKEN_TYPE] != T_STRING) {
            ++$localID;
        }

        $name = $this->tokens[$localID][self::TOKEN_CODE];
        if (!empty($namespace = $this->activeNamespace($tokenID))) {
            $name = $namespace . self::NS_SEPARATOR . $name;
        }

        $this->declarations[token_name($tokenType)][$name] = [
            self::O_TOKEN => $tokenID,
            self::C_TOKEN => $this->endingToken($tokenID),
        ];
    }
1256027
protected function isFilter($tokenId)
	{
		$filterName = rtrim($tokenId, '0123456789');

		if (in_array($filterName, $this->unfilteredTokens, true))
		{
			return true;
		}

		// Try to load the filter
		try
		{
			if ($this->configurator->attributeFilters->get('#' . $filterName))
			{
				return true;
			}
		}
		catch (Exception $e)
		{
			// Nothing to do here
		}

		return false;
	}
205863
public function validateOneTimeToken(string $token): bool
	{
		if(!empty($this->sessionData['mako.tokens']))
		{
			foreach($this->sessionData['mako.tokens'] as $key => $value)
			{
				if(hash_equals($value, $token))
				{
					unset($this->sessionData['mako.tokens'][$key]);

					return true;
				}
			}
		}

		return false;
	}
1126414
public static function isTokenType($token, $types)
    {
        if (!is_array($types)) {
            $types = array($types);
        }
        return is_array($token) ? in_array($token[0], $types) : in_array($token, $types);
    }
901651
private function isTokenOfType(File $sniffedFile, $index, $type)
    {
        $tokens = $sniffedFile->getTokens();

        return $tokens[$index]['type'] === $type;
    }