Skip to content

Commit dfdf183

Browse files
authored
[CLEANUP] Change AtRule::BLOCK_RULES to an array (#1556)
1 parent 5d342d3 commit dfdf183

3 files changed

Lines changed: 13 additions & 4 deletions

File tree

src/CSSList/CSSList.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ private static function parseAtRule(ParserState $parserState): ?CSSListItem
222222
}
223223
}
224224
$useRuleSet = true;
225-
foreach (\explode('/', AtRule::BLOCK_RULES) as $blockRuleName) {
225+
foreach (AtRule::BLOCK_RULES as $blockRuleName) {
226226
if (self::identifierIs($identifier, $blockRuleName)) {
227227
$useRuleSet = false;
228228
break;

src/Property/AtRule.php

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,17 @@ interface AtRule extends CSSListItem
1818
*
1919
* @internal since 8.5.2
2020
*/
21-
public const BLOCK_RULES =
22-
'media/document/supports/region-style/font-feature-values/container/layer/scope/starting-style';
21+
public const BLOCK_RULES = [
22+
'media',
23+
'document',
24+
'supports',
25+
'region-style',
26+
'font-feature-values',
27+
'container',
28+
'layer',
29+
'scope',
30+
'starting-style',
31+
];
2332

2433
/**
2534
* @return non-empty-string

tests/Unit/Property/AtRuleTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public function blockRulesConstantIsCorrect(): void
2929
'scope',
3030
'starting-style',
3131
],
32-
explode('/', AtRule::BLOCK_RULES)
32+
AtRule::BLOCK_RULES
3333
);
3434
}
3535
}

0 commit comments

Comments
 (0)