Skip to content

Commit f019438

Browse files
authored
[CLEANUP] Avoid Hungarian notation for sMediaQuery (#860)
Part of #756
1 parent dcb658c commit f019438

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

src/CSSList/CSSList.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -162,15 +162,15 @@ private static function parseAtRule(ParserState $parserState)
162162
if ($sIdentifier === 'import') {
163163
$oLocation = URL::parse($parserState);
164164
$parserState->consumeWhiteSpace();
165-
$sMediaQuery = null;
165+
$mediaQuery = null;
166166
if (!$parserState->comes(';')) {
167-
$sMediaQuery = \trim($parserState->consumeUntil([';', ParserState::EOF]));
168-
if ($sMediaQuery === '') {
169-
$sMediaQuery = null;
167+
$mediaQuery = \trim($parserState->consumeUntil([';', ParserState::EOF]));
168+
if ($mediaQuery === '') {
169+
$mediaQuery = null;
170170
}
171171
}
172172
$parserState->consumeUntil([';', ParserState::EOF], true, true);
173-
return new Import($oLocation, $sMediaQuery, $iIdentifierLineNum);
173+
return new Import($oLocation, $mediaQuery, $iIdentifierLineNum);
174174
} elseif ($sIdentifier === 'charset') {
175175
$oCharsetString = CSSString::parse($parserState);
176176
$parserState->consumeWhiteSpace();

src/Property/Import.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class Import implements AtRule
2121
/**
2222
* @var string
2323
*/
24-
private $sMediaQuery;
24+
private $mediaQuery;
2525

2626
/**
2727
* @var int
@@ -34,13 +34,13 @@ class Import implements AtRule
3434
protected $comments;
3535

3636
/**
37-
* @param string $sMediaQuery
37+
* @param string $mediaQuery
3838
* @param int $lineNumber
3939
*/
40-
public function __construct(URL $oLocation, $sMediaQuery, $lineNumber = 0)
40+
public function __construct(URL $oLocation, $mediaQuery, $lineNumber = 0)
4141
{
4242
$this->oLocation = $oLocation;
43-
$this->sMediaQuery = $sMediaQuery;
43+
$this->mediaQuery = $mediaQuery;
4444
$this->lineNumber = $lineNumber;
4545
$this->comments = [];
4646
}
@@ -77,7 +77,7 @@ public function __toString(): string
7777
public function render(OutputFormat $oOutputFormat): string
7878
{
7979
return $oOutputFormat->comments($this) . '@import ' . $this->oLocation->render($oOutputFormat)
80-
. ($this->sMediaQuery === null ? '' : ' ' . $this->sMediaQuery) . ';';
80+
. ($this->mediaQuery === null ? '' : ' ' . $this->mediaQuery) . ';';
8181
}
8282

8383
public function atRuleName(): string
@@ -91,8 +91,8 @@ public function atRuleName(): string
9191
public function atRuleArgs(): array
9292
{
9393
$aResult = [$this->oLocation];
94-
if ($this->sMediaQuery) {
95-
\array_push($aResult, $this->sMediaQuery);
94+
if ($this->mediaQuery) {
95+
\array_push($aResult, $this->mediaQuery);
9696
}
9797
return $aResult;
9898
}
@@ -126,6 +126,6 @@ public function setComments(array $comments): void
126126
*/
127127
public function getMediaQuery()
128128
{
129-
return $this->sMediaQuery;
129+
return $this->mediaQuery;
130130
}
131131
}

0 commit comments

Comments
 (0)