From e9902b925c54ea148080ce7275a2b7a8dbe7d69d Mon Sep 17 00:00:00 2001 From: Oliver Klee Date: Wed, 5 Mar 2025 00:26:10 +0100 Subject: [PATCH] [CLEANUP] Avoid Hungarian notation for `quote` (#1080) Part of #756 --- src/Value/CSSString.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/Value/CSSString.php b/src/Value/CSSString.php index 169adc26..162980d7 100644 --- a/src/Value/CSSString.php +++ b/src/Value/CSSString.php @@ -42,24 +42,24 @@ public function __construct($string, $lineNumber = 0) public static function parse(ParserState $parserState): CSSString { $begin = $parserState->peek(); - $sQuote = null; + $quote = null; if ($begin === "'") { - $sQuote = "'"; + $quote = "'"; } elseif ($begin === '"') { - $sQuote = '"'; + $quote = '"'; } - if ($sQuote !== null) { - $parserState->consume($sQuote); + if ($quote !== null) { + $parserState->consume($quote); } $result = ''; $sContent = null; - if ($sQuote === null) { + if ($quote === null) { // Unquoted strings end in whitespace or with braces, brackets, parentheses while (\preg_match('/[\\s{}()<>\\[\\]]/isu', $parserState->peek()) !== 1) { $result .= $parserState->parseCharacter(false); } } else { - while (!$parserState->comes($sQuote)) { + while (!$parserState->comes($quote)) { $sContent = $parserState->parseCharacter(false); if ($sContent === null) { throw new SourceException( @@ -69,7 +69,7 @@ public static function parse(ParserState $parserState): CSSString } $result .= $sContent; } - $parserState->consume($sQuote); + $parserState->consume($quote); } return new CSSString($result, $parserState->currentLine()); }