@@ -156,10 +156,10 @@ private static function parseListItem(ParserState $parserState, CSSList $list)
156
156
private static function parseAtRule (ParserState $ parserState )
157
157
{
158
158
$ parserState ->consume ('@ ' );
159
- $ sIdentifier = $ parserState ->parseIdentifier ();
159
+ $ identifier = $ parserState ->parseIdentifier ();
160
160
$ iIdentifierLineNum = $ parserState ->currentLine ();
161
161
$ parserState ->consumeWhiteSpace ();
162
- if ($ sIdentifier === 'import ' ) {
162
+ if ($ identifier === 'import ' ) {
163
163
$ oLocation = URL ::parse ($ parserState );
164
164
$ parserState ->consumeWhiteSpace ();
165
165
$ mediaQuery = null ;
@@ -171,21 +171,21 @@ private static function parseAtRule(ParserState $parserState)
171
171
}
172
172
$ parserState ->consumeUntil (['; ' , ParserState::EOF ], true , true );
173
173
return new Import ($ oLocation , $ mediaQuery , $ iIdentifierLineNum );
174
- } elseif ($ sIdentifier === 'charset ' ) {
174
+ } elseif ($ identifier === 'charset ' ) {
175
175
$ oCharsetString = CSSString::parse ($ parserState );
176
176
$ parserState ->consumeWhiteSpace ();
177
177
$ parserState ->consumeUntil (['; ' , ParserState::EOF ], true , true );
178
178
return new Charset ($ oCharsetString , $ iIdentifierLineNum );
179
- } elseif (self ::identifierIs ($ sIdentifier , 'keyframes ' )) {
179
+ } elseif (self ::identifierIs ($ identifier , 'keyframes ' )) {
180
180
$ oResult = new KeyFrame ($ iIdentifierLineNum );
181
- $ oResult ->setVendorKeyFrame ($ sIdentifier );
181
+ $ oResult ->setVendorKeyFrame ($ identifier );
182
182
$ oResult ->setAnimationName (\trim ($ parserState ->consumeUntil ('{ ' , false , true )));
183
183
CSSList::parseList ($ parserState , $ oResult );
184
184
if ($ parserState ->comes ('} ' )) {
185
185
$ parserState ->consume ('} ' );
186
186
}
187
187
return $ oResult ;
188
- } elseif ($ sIdentifier === 'namespace ' ) {
188
+ } elseif ($ identifier === 'namespace ' ) {
189
189
$ sPrefix = null ;
190
190
$ mUrl = Value::parsePrimitiveValue ($ parserState );
191
191
if (!$ parserState ->comes ('; ' )) {
@@ -217,16 +217,16 @@ private static function parseAtRule(ParserState $parserState)
217
217
}
218
218
$ bUseRuleSet = true ;
219
219
foreach (\explode ('/ ' , AtRule::BLOCK_RULES ) as $ sBlockRuleName ) {
220
- if (self ::identifierIs ($ sIdentifier , $ sBlockRuleName )) {
220
+ if (self ::identifierIs ($ identifier , $ sBlockRuleName )) {
221
221
$ bUseRuleSet = false ;
222
222
break ;
223
223
}
224
224
}
225
225
if ($ bUseRuleSet ) {
226
- $ oAtRule = new AtRuleSet ($ sIdentifier , $ sArgs , $ iIdentifierLineNum );
226
+ $ oAtRule = new AtRuleSet ($ identifier , $ sArgs , $ iIdentifierLineNum );
227
227
RuleSet::parseRuleSet ($ parserState , $ oAtRule );
228
228
} else {
229
- $ oAtRule = new AtRuleBlockList ($ sIdentifier , $ sArgs , $ iIdentifierLineNum );
229
+ $ oAtRule = new AtRuleBlockList ($ identifier , $ sArgs , $ iIdentifierLineNum );
230
230
CSSList::parseList ($ parserState , $ oAtRule );
231
231
if ($ parserState ->comes ('} ' )) {
232
232
$ parserState ->consume ('} ' );
@@ -240,12 +240,12 @@ private static function parseAtRule(ParserState $parserState)
240
240
* Tests an identifier for a given value. Since identifiers are all keywords, they can be vendor-prefixed.
241
241
* We need to check for these versions too.
242
242
*
243
- * @param string $sIdentifier
243
+ * @param string $identifier
244
244
*/
245
- private static function identifierIs ($ sIdentifier , string $ sMatch ): bool
245
+ private static function identifierIs ($ identifier , string $ sMatch ): bool
246
246
{
247
- return (\strcasecmp ($ sIdentifier , $ sMatch ) === 0 )
248
- ?: \preg_match ("/^(- \\w+-)? $ sMatch$/i " , $ sIdentifier ) === 1 ;
247
+ return (\strcasecmp ($ identifier , $ sMatch ) === 0 )
248
+ ?: \preg_match ("/^(- \\w+-)? $ sMatch$/i " , $ identifier ) === 1 ;
249
249
}
250
250
251
251
/**
0 commit comments