@@ -54,18 +54,18 @@ class ParserState
5454 /**
5555 * @var int
5656 */
57- private $ iLineNo ;
57+ private $ lineNumber ;
5858
5959 /**
6060 * @param string $sText the complete CSS as text (i.e., usually the contents of a CSS file)
61- * @param int $iLineNo
61+ * @param int $lineNumber
6262 */
63- public function __construct ($ sText , Settings $ oParserSettings , $ iLineNo = 1 )
63+ public function __construct ($ sText , Settings $ oParserSettings , $ lineNumber = 1 )
6464 {
6565 $ this ->oParserSettings = $ oParserSettings ;
6666 $ this ->sText = $ sText ;
6767 $ this ->iCurrentPosition = 0 ;
68- $ this ->iLineNo = $ iLineNo ;
68+ $ this ->lineNumber = $ lineNumber ;
6969 $ this ->setCharset ($ this ->oParserSettings ->sDefaultCharset );
7070 }
7171
@@ -98,7 +98,7 @@ public function getCharset()
9898 */
9999 public function currentLine ()
100100 {
101- return $ this ->iLineNo ;
101+ return $ this ->lineNumber ;
102102 }
103103
104104 /**
@@ -140,11 +140,11 @@ public function setPosition($iPosition): void
140140 public function parseIdentifier ($ bIgnoreCase = true )
141141 {
142142 if ($ this ->isEnd ()) {
143- throw new UnexpectedEOFException ('' , '' , 'identifier ' , $ this ->iLineNo );
143+ throw new UnexpectedEOFException ('' , '' , 'identifier ' , $ this ->lineNumber );
144144 }
145145 $ sResult = $ this ->parseCharacter (true );
146146 if ($ sResult === null ) {
147- throw new UnexpectedTokenException ($ sResult , $ this ->peek (5 ), 'identifier ' , $ this ->iLineNo );
147+ throw new UnexpectedTokenException ($ sResult , $ this ->peek (5 ), 'identifier ' , $ this ->lineNumber );
148148 }
149149 $ sCharacter = null ;
150150 while (!$ this ->isEnd () && ($ sCharacter = $ this ->parseCharacter (true )) !== null ) {
@@ -290,18 +290,18 @@ public function consume($mValue = 1): string
290290 $ iLineCount = \substr_count ($ mValue , "\n" );
291291 $ iLength = $ this ->strlen ($ mValue );
292292 if (!$ this ->streql ($ this ->substr ($ this ->iCurrentPosition , $ iLength ), $ mValue )) {
293- throw new UnexpectedTokenException ($ mValue , $ this ->peek (\max ($ iLength , 5 )), $ this ->iLineNo );
293+ throw new UnexpectedTokenException ($ mValue , $ this ->peek (\max ($ iLength , 5 )), $ this ->lineNumber );
294294 }
295- $ this ->iLineNo += $ iLineCount ;
295+ $ this ->lineNumber += $ iLineCount ;
296296 $ this ->iCurrentPosition += $ this ->strlen ($ mValue );
297297 return $ mValue ;
298298 } else {
299299 if ($ this ->iCurrentPosition + $ mValue > $ this ->iLength ) {
300- throw new UnexpectedEOFException ($ mValue , $ this ->peek (5 ), 'count ' , $ this ->iLineNo );
300+ throw new UnexpectedEOFException ($ mValue , $ this ->peek (5 ), 'count ' , $ this ->lineNumber );
301301 }
302302 $ sResult = $ this ->substr ($ this ->iCurrentPosition , $ mValue );
303303 $ iLineCount = \substr_count ($ sResult , "\n" );
304- $ this ->iLineNo += $ iLineCount ;
304+ $ this ->lineNumber += $ iLineCount ;
305305 $ this ->iCurrentPosition += $ mValue ;
306306 return $ sResult ;
307307 }
@@ -321,7 +321,7 @@ public function consumeExpression($mExpression, $iMaxLength = null): string
321321 if (\preg_match ($ mExpression , $ sInput , $ aMatches , PREG_OFFSET_CAPTURE ) === 1 ) {
322322 return $ this ->consume ($ aMatches [0 ][0 ]);
323323 }
324- throw new UnexpectedTokenException ($ mExpression , $ this ->peek (5 ), 'expression ' , $ this ->iLineNo );
324+ throw new UnexpectedTokenException ($ mExpression , $ this ->peek (5 ), 'expression ' , $ this ->lineNumber );
325325 }
326326
327327 /**
@@ -331,7 +331,7 @@ public function consumeComment()
331331 {
332332 $ mComment = false ;
333333 if ($ this ->comes ('/* ' )) {
334- $ iLineNo = $ this ->iLineNo ;
334+ $ lineNumber = $ this ->lineNumber ;
335335 $ this ->consume (1 );
336336 $ mComment = '' ;
337337 while (($ char = $ this ->consume (1 )) !== '' ) {
@@ -345,7 +345,7 @@ public function consumeComment()
345345
346346 if ($ mComment !== false ) {
347347 // We skip the * which was included in the comment.
348- return new Comment (\substr ($ mComment , 1 ), $ iLineNo );
348+ return new Comment (\substr ($ mComment , 1 ), $ lineNumber );
349349 }
350350
351351 return $ mComment ;
@@ -396,7 +396,7 @@ public function consumeUntil($aEnd, $bIncludeEnd = false, $consumeEnd = false, a
396396 'One of (" ' . \implode ('"," ' , $ aEnd ) . '") ' ,
397397 $ this ->peek (5 ),
398398 'search ' ,
399- $ this ->iLineNo
399+ $ this ->lineNumber
400400 );
401401 }
402402
0 commit comments