From b210eccd5ad336a6f5988a21935aa7317e2df9c9 Mon Sep 17 00:00:00 2001 From: Oliver Klee Date: Sun, 2 Feb 2025 15:15:18 +0100 Subject: [PATCH] [CLEANUP] Avoid Hungarian notation for `oResult` Part of #756 --- src/CSSList/CSSList.php | 10 +++++----- src/RuleSet/DeclarationBlock.php | 10 +++++----- src/Value/CSSFunction.php | 4 ++-- src/Value/URL.php | 4 ++-- 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/CSSList/CSSList.php b/src/CSSList/CSSList.php index 8d4a1c10..10bc1985 100644 --- a/src/CSSList/CSSList.php +++ b/src/CSSList/CSSList.php @@ -177,14 +177,14 @@ private static function parseAtRule(ParserState $parserState) $parserState->consumeUntil([';', ParserState::EOF], true, true); return new Charset($oCharsetString, $iIdentifierLineNum); } elseif (self::identifierIs($identifier, 'keyframes')) { - $oResult = new KeyFrame($iIdentifierLineNum); - $oResult->setVendorKeyFrame($identifier); - $oResult->setAnimationName(\trim($parserState->consumeUntil('{', false, true))); - CSSList::parseList($parserState, $oResult); + $result = new KeyFrame($iIdentifierLineNum); + $result->setVendorKeyFrame($identifier); + $result->setAnimationName(\trim($parserState->consumeUntil('{', false, true))); + CSSList::parseList($parserState, $result); if ($parserState->comes('}')) { $parserState->consume('}'); } - return $oResult; + return $result; } elseif ($identifier === 'namespace') { $sPrefix = null; $mUrl = Value::parsePrimitiveValue($parserState); diff --git a/src/RuleSet/DeclarationBlock.php b/src/RuleSet/DeclarationBlock.php index 08c08f00..231476cf 100644 --- a/src/RuleSet/DeclarationBlock.php +++ b/src/RuleSet/DeclarationBlock.php @@ -49,7 +49,7 @@ public function __construct($lineNumber = 0) public static function parse(ParserState $parserState, $list = null) { $comments = []; - $oResult = new DeclarationBlock($parserState->currentLine()); + $result = new DeclarationBlock($parserState->currentLine()); try { $aSelectorParts = []; $sStringWrapperChar = false; @@ -64,7 +64,7 @@ public static function parse(ParserState $parserState, $list = null) } } } while (!\in_array($parserState->peek(), ['{', '}'], true) || $sStringWrapperChar !== false); - $oResult->setSelectors(\implode('', $aSelectorParts), $list); + $result->setSelectors(\implode('', $aSelectorParts), $list); if ($parserState->comes('{')) { $parserState->consume(1); } @@ -78,9 +78,9 @@ public static function parse(ParserState $parserState, $list = null) throw $e; } } - $oResult->setComments($comments); - RuleSet::parseRuleSet($parserState, $oResult); - return $oResult; + $result->setComments($comments); + RuleSet::parseRuleSet($parserState, $result); + return $result; } /** diff --git a/src/Value/CSSFunction.php b/src/Value/CSSFunction.php index ac0d14f1..8e6372f3 100644 --- a/src/Value/CSSFunction.php +++ b/src/Value/CSSFunction.php @@ -46,10 +46,10 @@ public static function parse(ParserState $parserState, bool $bIgnoreCase = false $parserState->consume('('); $mArguments = self::parseArguments($parserState); - $oResult = new CSSFunction($sName, $mArguments, ',', $parserState->currentLine()); + $result = new CSSFunction($sName, $mArguments, ',', $parserState->currentLine()); $parserState->consume(')'); - return $oResult; + return $result; } /** diff --git a/src/Value/URL.php b/src/Value/URL.php index 6084417a..018abefc 100644 --- a/src/Value/URL.php +++ b/src/Value/URL.php @@ -53,12 +53,12 @@ public static function parse(ParserState $parserState): URL $oAnchor->backtrack(); } $parserState->consumeWhiteSpace(); - $oResult = new URL(CSSString::parse($parserState), $parserState->currentLine()); + $result = new URL(CSSString::parse($parserState), $parserState->currentLine()); if ($bUseUrl) { $parserState->consumeWhiteSpace(); $parserState->consume(')'); } - return $oResult; + return $result; } public function setURL(CSSString $oURL): void