Automattic\WooCommerce\Vendor\Symfony\Component\CssSelector\Parser

TokenStream::getNextIdentifierOrStarpublicWC 1.0

Returns next identifier or null if star delimiter token is found.

Method of the class: TokenStream{}

No Hooks.

Returns

null. Nothing (null).

Usage

$TokenStream = new TokenStream();
$TokenStream->getNextIdentifierOrStar(): ?string;

TokenStream::getNextIdentifierOrStar() code WC 10.8.1

public function getNextIdentifierOrStar(): ?string
{
    $next = $this->getNext();

    if ($next->isIdentifier()) {
        return $next->getValue();
    }

    if ($next->isDelimiter(['*'])) {
        return null;
    }

    throw SyntaxErrorException::unexpectedToken('identifier or "*"', $next);
}