@@ -62,37 +62,37 @@ public function __construct($lineNumber = 0)
62
62
* @throws UnexpectedTokenException
63
63
* @throws SourceException
64
64
*/
65
- public static function parseList (ParserState $ parserState , CSSList $ oList ): void
65
+ public static function parseList (ParserState $ parserState , CSSList $ list ): void
66
66
{
67
- $ bIsRoot = $ oList instanceof Document;
67
+ $ bIsRoot = $ list instanceof Document;
68
68
if (\is_string ($ parserState )) {
69
69
$ parserState = new ParserState ($ parserState , Settings::create ());
70
70
}
71
71
$ bLenientParsing = $ parserState ->getSettings ()->bLenientParsing ;
72
72
$ comments = [];
73
73
while (!$ parserState ->isEnd ()) {
74
74
$ comments = \array_merge ($ comments , $ parserState ->consumeWhiteSpace ());
75
- $ oListItem = null ;
75
+ $ listItem = null ;
76
76
if ($ bLenientParsing ) {
77
77
try {
78
- $ oListItem = self ::parseListItem ($ parserState , $ oList );
78
+ $ listItem = self ::parseListItem ($ parserState , $ list );
79
79
} catch (UnexpectedTokenException $ e ) {
80
- $ oListItem = false ;
80
+ $ listItem = false ;
81
81
}
82
82
} else {
83
- $ oListItem = self ::parseListItem ($ parserState , $ oList );
83
+ $ listItem = self ::parseListItem ($ parserState , $ list );
84
84
}
85
- if ($ oListItem === null ) {
85
+ if ($ listItem === null ) {
86
86
// List parsing finished
87
87
return ;
88
88
}
89
- if ($ oListItem ) {
90
- $ oListItem ->addComments ($ comments );
91
- $ oList ->append ($ oListItem );
89
+ if ($ listItem ) {
90
+ $ listItem ->addComments ($ comments );
91
+ $ list ->append ($ listItem );
92
92
}
93
93
$ comments = $ parserState ->consumeWhiteSpace ();
94
94
}
95
- $ oList ->addComments ($ comments );
95
+ $ list ->addComments ($ comments );
96
96
if (!$ bIsRoot && !$ bLenientParsing ) {
97
97
throw new SourceException ('Unexpected end of document ' , $ parserState ->currentLine ());
98
98
}
@@ -105,9 +105,9 @@ public static function parseList(ParserState $parserState, CSSList $oList): void
105
105
* @throws UnexpectedEOFException
106
106
* @throws UnexpectedTokenException
107
107
*/
108
- private static function parseListItem (ParserState $ parserState , CSSList $ oList )
108
+ private static function parseListItem (ParserState $ parserState , CSSList $ list )
109
109
{
110
- $ bIsRoot = $ oList instanceof Document;
110
+ $ bIsRoot = $ list instanceof Document;
111
111
if ($ parserState ->comes ('@ ' )) {
112
112
$ oAtRule = self ::parseAtRule ($ parserState );
113
113
if ($ oAtRule instanceof Charset) {
@@ -119,7 +119,7 @@ private static function parseListItem(ParserState $parserState, CSSList $oList)
119
119
$ parserState ->currentLine ()
120
120
);
121
121
}
122
- if (\count ($ oList ->getContents ()) > 0 ) {
122
+ if (\count ($ list ->getContents ()) > 0 ) {
123
123
throw new UnexpectedTokenException (
124
124
'@charset must be the first parseable token in a document ' ,
125
125
'' ,
@@ -142,7 +142,7 @@ private static function parseListItem(ParserState $parserState, CSSList $oList)
142
142
return null ;
143
143
}
144
144
} else {
145
- return DeclarationBlock::parse ($ parserState , $ oList );
145
+ return DeclarationBlock::parse ($ parserState , $ list );
146
146
}
147
147
}
148
148
0 commit comments