diff --git a/src/CSSList/CSSList.php b/src/CSSList/CSSList.php index 14c373ef..bb6426b7 100644 --- a/src/CSSList/CSSList.php +++ b/src/CSSList/CSSList.php @@ -162,15 +162,15 @@ private static function parseAtRule(ParserState $parserState) if ($sIdentifier === 'import') { $oLocation = URL::parse($parserState); $parserState->consumeWhiteSpace(); - $sMediaQuery = null; + $mediaQuery = null; if (!$parserState->comes(';')) { - $sMediaQuery = \trim($parserState->consumeUntil([';', ParserState::EOF])); - if ($sMediaQuery === '') { - $sMediaQuery = null; + $mediaQuery = \trim($parserState->consumeUntil([';', ParserState::EOF])); + if ($mediaQuery === '') { + $mediaQuery = null; } } $parserState->consumeUntil([';', ParserState::EOF], true, true); - return new Import($oLocation, $sMediaQuery, $iIdentifierLineNum); + return new Import($oLocation, $mediaQuery, $iIdentifierLineNum); } elseif ($sIdentifier === 'charset') { $oCharsetString = CSSString::parse($parserState); $parserState->consumeWhiteSpace(); diff --git a/src/Property/Import.php b/src/Property/Import.php index d48fa70d..80cd4c56 100644 --- a/src/Property/Import.php +++ b/src/Property/Import.php @@ -21,7 +21,7 @@ class Import implements AtRule /** * @var string */ - private $sMediaQuery; + private $mediaQuery; /** * @var int @@ -34,13 +34,13 @@ class Import implements AtRule protected $comments; /** - * @param string $sMediaQuery + * @param string $mediaQuery * @param int $lineNumber */ - public function __construct(URL $oLocation, $sMediaQuery, $lineNumber = 0) + public function __construct(URL $oLocation, $mediaQuery, $lineNumber = 0) { $this->oLocation = $oLocation; - $this->sMediaQuery = $sMediaQuery; + $this->mediaQuery = $mediaQuery; $this->lineNumber = $lineNumber; $this->comments = []; } @@ -77,7 +77,7 @@ public function __toString(): string public function render(OutputFormat $oOutputFormat): string { return $oOutputFormat->comments($this) . '@import ' . $this->oLocation->render($oOutputFormat) - . ($this->sMediaQuery === null ? '' : ' ' . $this->sMediaQuery) . ';'; + . ($this->mediaQuery === null ? '' : ' ' . $this->mediaQuery) . ';'; } public function atRuleName(): string @@ -91,8 +91,8 @@ public function atRuleName(): string public function atRuleArgs(): array { $aResult = [$this->oLocation]; - if ($this->sMediaQuery) { - \array_push($aResult, $this->sMediaQuery); + if ($this->mediaQuery) { + \array_push($aResult, $this->mediaQuery); } return $aResult; } @@ -126,6 +126,6 @@ public function setComments(array $comments): void */ public function getMediaQuery() { - return $this->sMediaQuery; + return $this->mediaQuery; } }