Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/CSSList/CSSList.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,12 @@ public static function parseList(ParserState $parserState, CSSList $list): void
if (\is_string($parserState)) {
$parserState = new ParserState($parserState, Settings::create());
}
$bLenientParsing = $parserState->getSettings()->bLenientParsing;
$usesLenientParsing = $parserState->getSettings()->bLenientParsing;
$comments = [];
while (!$parserState->isEnd()) {
$comments = \array_merge($comments, $parserState->consumeWhiteSpace());
$listItem = null;
if ($bLenientParsing) {
if ($usesLenientParsing) {
try {
$listItem = self::parseListItem($parserState, $list);
} catch (UnexpectedTokenException $e) {
Expand All @@ -93,7 +93,7 @@ public static function parseList(ParserState $parserState, CSSList $list): void
$comments = $parserState->consumeWhiteSpace();
}
$list->addComments($comments);
if (!$bIsRoot && !$bLenientParsing) {
if (!$bIsRoot && !$usesLenientParsing) {
throw new SourceException('Unexpected end of document', $parserState->currentLine());
}
}
Expand Down
6 changes: 3 additions & 3 deletions src/Settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,13 +80,13 @@ public function withDefaultCharset($sDefaultCharset): self
/**
* Configures whether the parser should silently ignore invalid rules.
*
* @param bool $bLenientParsing
* @param bool $usesLenientParsing
*
* @return $this fluent interface
*/
public function withLenientParsing($bLenientParsing = true): self
public function withLenientParsing($usesLenientParsing = true): self
{
$this->bLenientParsing = $bLenientParsing;
$this->bLenientParsing = $usesLenientParsing;
return $this;
}

Expand Down