Skip to content

[CLEANUP] Avoid Hungarian notation for arguments #916

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 14, 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
14 changes: 7 additions & 7 deletions src/CSSList/AtRuleBlockList.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class AtRuleBlockList extends CSSBlockList implements AtRule
/**
* @var string
*/
private $sArgs;
private $arguments;

/**
* @param string $type
Expand All @@ -31,7 +31,7 @@ public function __construct($type, $arguments = '', $lineNumber = 0)
{
parent::__construct($lineNumber);
$this->type = $type;
$this->sArgs = $arguments;
$this->arguments = $arguments;
}

/**
Expand All @@ -47,7 +47,7 @@ public function atRuleName()
*/
public function atRuleArgs()
{
return $this->sArgs;
return $this->arguments;
}

public function __toString(): string
Expand All @@ -59,11 +59,11 @@ public function render(OutputFormat $outputFormat): string
{
$sResult = $outputFormat->comments($this);
$sResult .= $outputFormat->sBeforeAtRuleBlock;
$sArgs = $this->sArgs;
if ($sArgs) {
$sArgs = ' ' . $sArgs;
$arguments = $this->arguments;
if ($arguments) {
$arguments = ' ' . $arguments;
}
$sResult .= "@{$this->type}$sArgs{$outputFormat->spaceBeforeOpeningBrace()}{";
$sResult .= "@{$this->type}$arguments{$outputFormat->spaceBeforeOpeningBrace()}{";
$sResult .= $this->renderListContents($outputFormat);
$sResult .= '}';
$sResult .= $outputFormat->sAfterAtRuleBlock;
Expand Down
18 changes: 9 additions & 9 deletions src/RuleSet/AtRuleSet.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,18 @@ class AtRuleSet extends RuleSet implements AtRule
/**
* @var string
*/
private $sArgs;
private $arguments;

/**
* @param string $sType
* @param string $sArgs
* @param string $arguments
* @param int<0, max> $lineNumber
*/
public function __construct($sType, $sArgs = '', $lineNumber = 0)
public function __construct($sType, $arguments = '', $lineNumber = 0)
{
parent::__construct($lineNumber);
$this->sType = $sType;
$this->sArgs = $sArgs;
$this->arguments = $arguments;
}

/**
Expand All @@ -50,7 +50,7 @@ public function atRuleName()
*/
public function atRuleArgs()
{
return $this->sArgs;
return $this->arguments;
}

public function __toString(): string
Expand All @@ -61,11 +61,11 @@ public function __toString(): string
public function render(OutputFormat $outputFormat): string
{
$sResult = $outputFormat->comments($this);
$sArgs = $this->sArgs;
if ($sArgs) {
$sArgs = ' ' . $sArgs;
$arguments = $this->arguments;
if ($arguments) {
$arguments = ' ' . $arguments;
}
$sResult .= "@{$this->sType}$sArgs{$outputFormat->spaceBeforeOpeningBrace()}{";
$sResult .= "@{$this->sType}$arguments{$outputFormat->spaceBeforeOpeningBrace()}{";
$sResult .= $this->renderRules($outputFormat);
$sResult .= '}';
return $sResult;
Expand Down