Skip to content

Commit ed5dea7

Browse files
committed
[CLEANUP] Avoid Hungarian notation for outputFormat
Part of #756
1 parent b3e83b8 commit ed5dea7

19 files changed

+60
-60
lines changed

src/CSSList/AtRuleBlockList.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,18 +55,18 @@ public function __toString(): string
5555
return $this->render(new OutputFormat());
5656
}
5757

58-
public function render(OutputFormat $oOutputFormat): string
58+
public function render(OutputFormat $outputFormat): string
5959
{
60-
$sResult = $oOutputFormat->comments($this);
61-
$sResult .= $oOutputFormat->sBeforeAtRuleBlock;
60+
$sResult = $outputFormat->comments($this);
61+
$sResult .= $outputFormat->sBeforeAtRuleBlock;
6262
$sArgs = $this->sArgs;
6363
if ($sArgs) {
6464
$sArgs = ' ' . $sArgs;
6565
}
66-
$sResult .= "@{$this->type}$sArgs{$oOutputFormat->spaceBeforeOpeningBrace()}{";
67-
$sResult .= $this->renderListContents($oOutputFormat);
66+
$sResult .= "@{$this->type}$sArgs{$outputFormat->spaceBeforeOpeningBrace()}{";
67+
$sResult .= $this->renderListContents($outputFormat);
6868
$sResult .= '}';
69-
$sResult .= $oOutputFormat->sAfterAtRuleBlock;
69+
$sResult .= $outputFormat->sAfterAtRuleBlock;
7070
return $sResult;
7171
}
7272

src/CSSList/CSSList.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -410,16 +410,16 @@ public function __toString(): string
410410
/**
411411
* @return string
412412
*/
413-
protected function renderListContents(OutputFormat $oOutputFormat)
413+
protected function renderListContents(OutputFormat $outputFormat)
414414
{
415415
$result = '';
416416
$isFirst = true;
417-
$nextLevelFormat = $oOutputFormat;
417+
$nextLevelFormat = $outputFormat;
418418
if (!$this->isRootList()) {
419-
$nextLevelFormat = $oOutputFormat->nextLevel();
419+
$nextLevelFormat = $outputFormat->nextLevel();
420420
}
421421
foreach ($this->contents as $listItem) {
422-
$renderedCss = $oOutputFormat->safely(static function () use ($nextLevelFormat, $listItem): string {
422+
$renderedCss = $outputFormat->safely(static function () use ($nextLevelFormat, $listItem): string {
423423
return $listItem->render($nextLevelFormat);
424424
});
425425
if ($renderedCss === null) {
@@ -436,7 +436,7 @@ protected function renderListContents(OutputFormat $oOutputFormat)
436436

437437
if (!$isFirst) {
438438
// Had some output
439-
$result .= $oOutputFormat->spaceAfterBlocks();
439+
$result .= $outputFormat->spaceAfterBlocks();
440440
}
441441

442442
return $result;

src/CSSList/Document.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -114,12 +114,12 @@ public function getSelectorsBySpecificity($sSpecificitySearch = null): array
114114
/**
115115
* Overrides `render()` to make format argument optional.
116116
*/
117-
public function render(?OutputFormat $oOutputFormat = null): string
117+
public function render(?OutputFormat $outputFormat = null): string
118118
{
119-
if ($oOutputFormat === null) {
120-
$oOutputFormat = new OutputFormat();
119+
if ($outputFormat === null) {
120+
$outputFormat = new OutputFormat();
121121
}
122-
return $oOutputFormat->comments($this) . $this->renderListContents($oOutputFormat);
122+
return $outputFormat->comments($this) . $this->renderListContents($outputFormat);
123123
}
124124

125125
public function isRootList(): bool

src/CSSList/KeyFrame.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,11 +66,11 @@ public function __toString(): string
6666
return $this->render(new OutputFormat());
6767
}
6868

69-
public function render(OutputFormat $oOutputFormat): string
69+
public function render(OutputFormat $outputFormat): string
7070
{
71-
$sResult = $oOutputFormat->comments($this);
72-
$sResult .= "@{$this->vendorKeyFrame} {$this->animationName}{$oOutputFormat->spaceBeforeOpeningBrace()}{";
73-
$sResult .= $this->renderListContents($oOutputFormat);
71+
$sResult = $outputFormat->comments($this);
72+
$sResult .= "@{$this->vendorKeyFrame} {$this->animationName}{$outputFormat->spaceBeforeOpeningBrace()}{";
73+
$sResult .= $this->renderListContents($outputFormat);
7474
$sResult .= '}';
7575
return $sResult;
7676
}

src/Property/CSSNamespace.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,10 @@ public function __toString(): string
6060
return $this->render(new OutputFormat());
6161
}
6262

63-
public function render(OutputFormat $oOutputFormat): string
63+
public function render(OutputFormat $outputFormat): string
6464
{
6565
return '@namespace ' . ($this->sPrefix === null ? '' : $this->sPrefix . ' ')
66-
. $this->mUrl->render($oOutputFormat) . ';';
66+
. $this->mUrl->render($outputFormat) . ';';
6767
}
6868

6969
/**

src/Property/Charset.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,9 @@ public function __toString(): string
7777
return $this->render(new OutputFormat());
7878
}
7979

80-
public function render(OutputFormat $oOutputFormat): string
80+
public function render(OutputFormat $outputFormat): string
8181
{
82-
return "{$oOutputFormat->comments($this)}@charset {$this->oCharset->render($oOutputFormat)};";
82+
return "{$outputFormat->comments($this)}@charset {$this->oCharset->render($outputFormat)};";
8383
}
8484

8585
public function atRuleName(): string

src/Property/Import.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,9 @@ public function __toString(): string
7878
return $this->render(new OutputFormat());
7979
}
8080

81-
public function render(OutputFormat $oOutputFormat): string
81+
public function render(OutputFormat $outputFormat): string
8282
{
83-
return $oOutputFormat->comments($this) . '@import ' . $this->location->render($oOutputFormat)
83+
return $outputFormat->comments($this) . '@import ' . $this->location->render($outputFormat)
8484
. ($this->mediaQuery === null ? '' : ' ' . $this->mediaQuery) . ';';
8585
}
8686

src/Renderable.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ interface Renderable
88
{
99
public function __toString(): string;
1010

11-
public function render(OutputFormat $oOutputFormat): string;
11+
public function render(OutputFormat $outputFormat): string;
1212

1313
/**
1414
* @return int<0, max>

src/Rule/Rule.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -267,11 +267,11 @@ public function __toString(): string
267267
return $this->render(new OutputFormat());
268268
}
269269

270-
public function render(OutputFormat $oOutputFormat): string
270+
public function render(OutputFormat $outputFormat): string
271271
{
272-
$sResult = "{$oOutputFormat->comments($this)}{$this->sRule}:{$oOutputFormat->spaceAfterRuleName()}";
272+
$sResult = "{$outputFormat->comments($this)}{$this->sRule}:{$outputFormat->spaceAfterRuleName()}";
273273
if ($this->mValue instanceof Value) { // Can also be a ValueList
274-
$sResult .= $this->mValue->render($oOutputFormat);
274+
$sResult .= $this->mValue->render($outputFormat);
275275
} else {
276276
$sResult .= $this->mValue;
277277
}

src/RuleSet/AtRuleSet.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,15 +58,15 @@ public function __toString(): string
5858
return $this->render(new OutputFormat());
5959
}
6060

61-
public function render(OutputFormat $oOutputFormat): string
61+
public function render(OutputFormat $outputFormat): string
6262
{
63-
$sResult = $oOutputFormat->comments($this);
63+
$sResult = $outputFormat->comments($this);
6464
$sArgs = $this->sArgs;
6565
if ($sArgs) {
6666
$sArgs = ' ' . $sArgs;
6767
}
68-
$sResult .= "@{$this->sType}$sArgs{$oOutputFormat->spaceBeforeOpeningBrace()}{";
69-
$sResult .= $this->renderRules($oOutputFormat);
68+
$sResult .= "@{$this->sType}$sArgs{$outputFormat->spaceBeforeOpeningBrace()}{";
69+
$sResult .= $this->renderRules($outputFormat);
7070
$sResult .= '}';
7171
return $sResult;
7272
}

0 commit comments

Comments
 (0)