Skip to content

[CLEANUP] Avoid Hungarian notion for the Commentable interface #804

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
Jan 25, 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
18 changes: 9 additions & 9 deletions src/CSSList/CSSList.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ abstract class CSSList implements Renderable, Commentable
/**
* @var array<array-key, Comment>
*/
protected $aComments;
protected $comments;

/**
* @var array<int, RuleSet|CSSList|Import|Charset>
Expand All @@ -53,7 +53,7 @@ abstract class CSSList implements Renderable, Commentable
*/
public function __construct($iLineNo = 0)
{
$this->aComments = [];
$this->comments = [];
$this->aContents = [];
$this->iLineNo = $iLineNo;
}
Expand Down Expand Up @@ -456,26 +456,26 @@ public function getContents()
}

/**
* @param array<array-key, Comment> $aComments
* @param array<array-key, Comment> $comments
*/
public function addComments(array $aComments): void
public function addComments(array $comments): void
{
$this->aComments = \array_merge($this->aComments, $aComments);
$this->comments = \array_merge($this->comments, $comments);
}

/**
* @return array<array-key, Comment>
*/
public function getComments()
{
return $this->aComments;
return $this->comments;
}

/**
* @param array<array-key, Comment> $aComments
* @param array<array-key, Comment> $comments
*/
public function setComments(array $aComments): void
public function setComments(array $comments): void
{
$this->aComments = $aComments;
$this->comments = $comments;
}
}
8 changes: 4 additions & 4 deletions src/Comment/Commentable.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,21 @@
interface Commentable
{
/**
* @param array<array-key, Comment> $aComments
* @param array<array-key, Comment> $comments
*
* @return void
*/
public function addComments(array $aComments);
public function addComments(array $comments);

/**
* @return array<array-key, Comment>
*/
public function getComments();

/**
* @param array<array-key, Comment> $aComments
* @param array<array-key, Comment> $comments
*
* @return void
*/
public function setComments(array $aComments);
public function setComments(array $comments);
}
18 changes: 9 additions & 9 deletions src/Property/CSSNamespace.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class CSSNamespace implements AtRule
/**
* @var array<array-key, Comment>
*/
protected $aComments;
protected $comments;

/**
* @param string $mUrl
Expand All @@ -42,7 +42,7 @@ public function __construct($mUrl, $sPrefix = null, $iLineNo = 0)
$this->mUrl = $mUrl;
$this->sPrefix = $sPrefix;
$this->iLineNo = $iLineNo;
$this->aComments = [];
$this->comments = [];
}

/**
Expand Down Expand Up @@ -117,26 +117,26 @@ public function atRuleArgs(): array
}

/**
* @param array<array-key, Comment> $aComments
* @param array<array-key, Comment> $comments
*/
public function addComments(array $aComments): void
public function addComments(array $comments): void
{
$this->aComments = \array_merge($this->aComments, $aComments);
$this->comments = \array_merge($this->comments, $comments);
}

/**
* @return array<array-key, Comment>
*/
public function getComments()
{
return $this->aComments;
return $this->comments;
}

/**
* @param array<array-key, Comment> $aComments
* @param array<array-key, Comment> $comments
*/
public function setComments(array $aComments): void
public function setComments(array $comments): void
{
$this->aComments = $aComments;
$this->comments = $comments;
}
}
18 changes: 9 additions & 9 deletions src/Property/Charset.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class Charset implements AtRule
/**
* @var array<array-key, Comment>
*/
protected $aComments;
protected $comments;

/**
* @param CSSString $oCharset
Expand All @@ -41,7 +41,7 @@ public function __construct(CSSString $oCharset, $iLineNo = 0)
{
$this->oCharset = $oCharset;
$this->iLineNo = $iLineNo;
$this->aComments = [];
$this->comments = [];
}

/**
Expand Down Expand Up @@ -95,30 +95,30 @@ public function atRuleArgs()
}

/**
* @param array<array-key, Comment> $aComments
* @param array<array-key, Comment> $comments
*
* @return void
*/
public function addComments(array $aComments): void
public function addComments(array $comments): void
{
$this->aComments = \array_merge($this->aComments, $aComments);
$this->comments = \array_merge($this->comments, $comments);
}

/**
* @return array<array-key, Comment>
*/
public function getComments()
{
return $this->aComments;
return $this->comments;
}

/**
* @param array<array-key, Comment> $aComments
* @param array<array-key, Comment> $comments
*
* @return void
*/
public function setComments(array $aComments): void
public function setComments(array $comments): void
{
$this->aComments = $aComments;
$this->comments = $comments;
}
}
18 changes: 9 additions & 9 deletions src/Property/Import.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class Import implements AtRule
/**
* @var array<array-key, Comment>
*/
protected $aComments;
protected $comments;

/**
* @param URL $oLocation
Expand All @@ -43,7 +43,7 @@ public function __construct(URL $oLocation, $sMediaQuery, $iLineNo = 0)
$this->oLocation = $oLocation;
$this->sMediaQuery = $sMediaQuery;
$this->iLineNo = $iLineNo;
$this->aComments = [];
$this->comments = [];
}

/**
Expand Down Expand Up @@ -99,27 +99,27 @@ public function atRuleArgs(): array
}

/**
* @param array<array-key, Comment> $aComments
* @param array<array-key, Comment> $comments
*/
public function addComments(array $aComments): void
public function addComments(array $comments): void
{
$this->aComments = \array_merge($this->aComments, $aComments);
$this->comments = \array_merge($this->comments, $comments);
}

/**
* @return array<array-key, Comment>
*/
public function getComments()
{
return $this->aComments;
return $this->comments;
}

/**
* @param array<array-key, Comment> $aComments
* @param array<array-key, Comment> $comments
*/
public function setComments(array $aComments): void
public function setComments(array $comments): void
{
$this->aComments = $aComments;
$this->comments = $comments;
}

/**
Expand Down
18 changes: 9 additions & 9 deletions src/Rule/Rule.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class Rule implements Renderable, Commentable
/**
* @var array<array-key, Comment>
*/
protected $aComments;
protected $comments;

/**
* @param string $sRule
Expand All @@ -69,7 +69,7 @@ public function __construct($sRule, $iLineNo = 0, $iColNo = 0)
$this->aIeHack = [];
$this->iLineNo = $iLineNo;
$this->iColNo = $iColNo;
$this->aComments = [];
$this->comments = [];
}

/**
Expand Down Expand Up @@ -284,26 +284,26 @@ public function render(OutputFormat $oOutputFormat): string
}

/**
* @param array<array-key, Comment> $aComments
* @param array<array-key, Comment> $comments
*/
public function addComments(array $aComments): void
public function addComments(array $comments): void
{
$this->aComments = \array_merge($this->aComments, $aComments);
$this->comments = \array_merge($this->comments, $comments);
}

/**
* @return array<array-key, Comment>
*/
public function getComments()
{
return $this->aComments;
return $this->comments;
}

/**
* @param array<array-key, Comment> $aComments
* @param array<array-key, Comment> $comments
*/
public function setComments(array $aComments): void
public function setComments(array $comments): void
{
$this->aComments = $aComments;
$this->comments = $comments;
}
}
18 changes: 9 additions & 9 deletions src/RuleSet/RuleSet.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ abstract class RuleSet implements Renderable, Commentable
/**
* @var array<array-key, Comment>
*/
protected $aComments;
protected $comments;

/**
* @param int $iLineNo
Expand All @@ -46,7 +46,7 @@ public function __construct($iLineNo = 0)
{
$this->aRules = [];
$this->iLineNo = $iLineNo;
$this->aComments = [];
$this->comments = [];
}

/**
Expand Down Expand Up @@ -294,26 +294,26 @@ protected function renderRules(OutputFormat $oOutputFormat)
}

/**
* @param array<string, Comment> $aComments
* @param array<string, Comment> $comments
*/
public function addComments(array $aComments): void
public function addComments(array $comments): void
{
$this->aComments = \array_merge($this->aComments, $aComments);
$this->comments = \array_merge($this->comments, $comments);
}

/**
* @return array<string, Comment>
*/
public function getComments()
{
return $this->aComments;
return $this->comments;
}

/**
* @param array<string, Comment> $aComments
* @param array<string, Comment> $comments
*/
public function setComments(array $aComments): void
public function setComments(array $comments): void
{
$this->aComments = $aComments;
$this->comments = $comments;
}
}