Skip to content

Commit 873085a

Browse files
committed
Add local static for stop characters
1 parent 0ac639b commit 873085a

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

src/RuleSet/DeclarationBlock.php

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,16 +45,12 @@ public static function parse(ParserState $parserState, ?CSSList $list = null): ?
4545
$stringWrapperCharacter = null;
4646
$functionNestingLevel = 0;
4747
$consumedNextCharacter = false;
48+
static $stopCharacters = ['{', '}', '\'', '"', '(', ')', ','];
4849
do {
4950
if (!$consumedNextCharacter) {
5051
$selectorParts[] = $parserState->consume(1);
5152
}
52-
$selectorParts[] = $parserState->consumeUntil(
53-
['{', '}', '\'', '"', '(', ')', ','],
54-
false,
55-
false,
56-
$comments
57-
);
53+
$selectorParts[] = $parserState->consumeUntil($stopCharacters, false, false, $comments);
5854
$nextCharacter = $parserState->peek();
5955
$consumedNextCharacter = false;
6056
switch ($nextCharacter) {

0 commit comments

Comments
 (0)