Skip to content

[CLEANUP] Avoid Hungarian notation for oResult #865

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 2, 2025
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
10 changes: 5 additions & 5 deletions src/CSSList/CSSList.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
10 changes: 5 additions & 5 deletions src/RuleSet/DeclarationBlock.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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);
}
Expand All @@ -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;
}

/**
Expand Down
4 changes: 2 additions & 2 deletions src/Value/CSSFunction.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

/**
Expand Down
4 changes: 2 additions & 2 deletions src/Value/URL.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down